change tensor type pytorch code example
Example: change tensor type pytorch
y = y.to(torch.long)
# torch.long, torch.int16, torch.int32, torch.float16, etc.
y = y.to(torch.long)
# torch.long, torch.int16, torch.int32, torch.float16, etc.