# Codeblock 9 def no_object_loss_test(): target = torch.zeros(BATCH_SIZE, S, S, (C+5)) prediction = torch.zeros(BATCH_SIZE, S, S, (C+B*5)) target[0, 1, 1, 20] = 0.0 #(1) prediction[0, 1, 1, 20] = 0.0 #(2) prediction[0, 1, 1, 25] = 0.0 #(3) #prediction[0, 1, 1, 20] = 0.2 #(4) #prediction[0, 1, 1, 25] = 0.3 #(5) target = target.reshape(BATCH_SIZE, S*S*(C+5)) prediction = prediction.reshape(BATCH_SIZE, S*S*(C+B*5)) no_object_loss = loss(target, prediction)[2] return no_object_loss no_object_loss_test()