Alternative to in version 1.0.0


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 function. I checked in the source code of torch, and that function is nowhere to be found in Has that function been deprecated in release 1.0.0 of Pytorch? Am I not looking at the right spot?

Thanks! in this version 1.0.0:

>>> torch.__version__
>>> t1 = torch.randn(3, 5, 5)
>>> t2 = torch.randn(4, 5, 5)
>>> t =[t1, t2], dim=0)
>>> t.shape
torch.Size([7, 5, 5])

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 from whatever source file it’s located in…

I have some experience working with PyCharm. So, do you correctly specify the python interpreter in the configuration, like the image below?

I think I do!

So, PyCharm sends me a warning that he can’t find any reference for inside of torch, but when I run the code there is no execution error, and he performs correctly…I don’t know why PyCharm fails to recognise it, but I can live with it!

Anyways, thanks for your help!