# Codeblock 6 def bbox_loss_test(): target = torch.zeros(BATCH_SIZE, S, S, (C+5)) #(1) prediction = torch.zeros(BATCH_SIZE, S, S, (C+B*5)) #(2) target[0, 3, 3, 21:25] = torch.tensor([0.4, 0.5, 2.4, 3.2]) #(3) target[0, 3, 3, 20] = 1.0 #(4) target[0, 3, 3, 7] = 1.0 #(5) prediction[0, 3, 3, 21:25] = torch.tensor([0.4, 0.5, 2.4, 3.2]) #(6) #prediction[0, 3, 3, 21:25] = torch.tensor([0.4, 0.5, 2.8, 4.0]) #(7) #prediction[0, 3, 3, 21:25] = torch.tensor([0.3, 0.2, 3.2, 4.3]) #(8) target = target.reshape(BATCH_SIZE, S*S*(C+5)) #(9) prediction = prediction.reshape(BATCH_SIZE, S*S*(C+B*5)) #(10) bbox_loss = loss(target, prediction)[0] #(11) return bbox_loss bbox_loss_test()