About the loss result of my function I have something like that:
tensor([1.0996, 0.9478], device='cuda:0', grad_fn=<DivBackward0>)
I have a tensor as large as my chosen batch (2), but I should have a single value to calculate the loss or am I wrong?
It might work in this way? loss = torch.sum(loss)