change tensor type pytorch

Solutions on MaxInterview for change tensor type pytorch by the best coders in the world

showing results for - "change tensor type pytorch"
Cassie
25 May 2017
1y = y.to(torch.long)
2# torch.long, torch.int16, torch.int32, torch.float16, etc.