I'm using:
python 3.8.10
torch 1.11.0+cu113
And:
NVIDIA-SMI 470.103.01 Driver Version: 470.103.01 CUDA Version: 11.4
Ubuntu 20.04.4 LTS
I can run the following commands via jupyter notebook with not error:
out = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
mX = mX.to(out)
When I try to run those commands from pycharm (with same virtual environment), nothing happens and it gets stuck.
I looked here:
Pytorch .to('cuda') or .cuda() doesn't work and just get stuck and didn't found any answer.
- Why I can use
to('cuda')fromjupyter notebookand not frompycharm? - What do I need to do in order to run from
pycharm?