Pytorch не работает с CUDA в PyCharm/IntelliJPython

Программы на Python
Гость
Pytorch не работает с CUDA в PyCharm/IntelliJ

Сообщение Гость »


Я только что загрузил PyTorch с CUDA через Anaconda, и когда я ввожу терминал Anaconda:

Код: Выделить всё

import torch
if torch.cuda.is_available():
print('it works')
then he outputs that; that means that it worked and it works with PyTorch.
But when I go to my IDE (PyCharm and IntelliJ) and write the same code, it doesn't output anything.
Could someone please explain to me how I can somehow get this to work in the IDE?


Источник: https://stackoverflow.com/questions/654 ... m-intellij

Вернуться в «Python»