close
> import torch
> torch.version.__version__
'2.0.1+cpu'
顯然這個不支援cuda
> a = torch.ones(3,3)
> b = torch.ones(3,3)
> a = a.to('cuda')
b = b.to('cuda')
a+b
> pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
> torch.version.__version__
'2.0.1+cu118'
全站熱搜
留言列表