Still not working 
Both a.nonzero() and a.nonzero() are torch.cuda.LongTensor of size 10x2, but for some reason only the latter throws the above error.
By the way, is PyTorch 0.4 only for Python 3.5? I upgraded my PyTorch but it only installed 3.1…