Solved by ptrblck in post #2 
              
              
                Yes, this seems to be the case for random input values: 
pred = torch.randn(10, 10, 10, 10)
gt = torch.randn(10, 10, 10, 10)

l1_loss = torch.nn.L1Loss()
loss1 = l1_loss(pred,gt)


for idx in range(pred.size(0)):
  if idx==0:
    loss2 = l1_loss(pred[idx,:,:,:],gt[idx,:,:,:])
  else:
    loss2 = l1_…