Hi all, I’m able to import torch but am getting an error about torch not being defined (NameError: name ‘torch’ is not defined) for the following statement:
device = torch.device(‘cuda’) if torch.cuda.is_available() else torch.device(‘cpu’)
Background: do not have cuda, just using cpu. python version: 3.7.6, pytorch ver: 1.5.1, using conda. Any insights would be greatly appreciated, thanks