I’m running some python code on Pycharm (version 3.6 of python) and I’m working on tensors with the torch library (version 1.0.0). Unfortunately my interpreter can’t find the torch.cat() function. I checked in the source code of torch, and that function is nowhere to be found in init.py. Has that function been deprecated in release 1.0.0 of Pytorch? Am I not looking at the right spot?
Can you verify that you are using pytorch version 1.0.0? Sometimes when I use Jupyter notebook, the jupyter kernel is launched from a different python executable. Then I have seen that right after installing the newest pytorch, my jupyter was still showing the older version.
I verified my PyCharm interpreter, it is indeed version 1.0.0 for pytorch. Interestingly, when running the same code on Jupyter, the interpreter manages to correctly import torch.cat from whatever source file it’s located in…
So, PyCharm sends me a warning that he can’t find any reference for torch.cat inside __init__.py of torch, but when I run the code there is no execution error, and he performs torch.cat correctly…I don’t know why PyCharm fails to recognise it, but I can live with it!