Python/numpy & Pytorch
[Pytorch] Pytorch 버전 확인과 GPU 연결 확인
파송송
2023. 6. 4. 15:40
728x90
버전 확인
import torch
print(torch.__version__)
GPU 연결 확인
device = 'cuda' if torch.cuda.is_available() else 'cpu'
print(device)
728x90