torch.tensor. 'module' object not callable : pytorch
www.reddit.com › r › pytorchEvery torch code with cuda I've run so far works, but a simple torch.tensor() call gives me an error: TypeError: 'module' object is not callable. It's strange because if I go to the terminal and run a simple python code such as: import torch. a = torch.tensor([[1., -1.], [1., -1.]], dtype=torch.uint8, device='cuda:0').unsqueeze(0)