Solved by Nikronic in post #3 
              
              
                Hi, 
First of all, PyCharm or most of IDEs cannot really analysis libraries like PyTorch which has C++ backend and Python frontend so it is normal to get warning or missing errors but your codes works fine. 
But about your question: 
When you are on GPU, torch.Tensor() will convert your data type to…