Okay, so somewhere in data you have a 0D tensor that shouldn’t be there. If you just initialize a tensor like the following: x = torch.Tensor() you’d get the 0D tensor.
Maybe try checking your inputs to make sure all of the tensors were created properly?