Thanks, that solved this error. Just so I can debug more easily in the future, how did you know that the labels are the target that I needed to change the datatype for? I wasn’t sure how to interpret which target was meant by the error of: “RuntimeError: Expected object of scalar type Long but got scalar type Byte for argument #2 ‘target’”. I saw it was the target in “ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)” but I still didn’t know what target that meant.
Also, what determines the initial datatype of the tensors? I didn’t specify Byte anywhere in my code when initializing them.
Thank you!