# Codeblock 5a def loss(target, prediction): #(1) target = target.reshape(-1, S, S, C+5) #(2) prediction = prediction.reshape(-1, S, S, C+B*5) #(3) obj = target[..., 20].unsqueeze(3) #(4) noobj = 1 - obj #(5)