安装问题:“install torch” Code Answer’s

'''

Linux / Binder

!pip install numpy torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

Windows

!pip install numpy torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

MacOS

!pip install numpy torch torchvision torchaudio

'''

'''
import torch
print(torch.version)
'''
pytorch installation for python 3.8.5” Code Answer’s
'''
pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
'''
'''
import torch
x = torch.rand(5, 3)
print(x)
'''

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容