pytorch的安裝
查看pytorch版本
import torch
print(torch.__version__)
注:__version__的下劃線是兩個下劃線
出現的一個小問題
在輸入相關命令查看pytorch版本時,出現以下報錯信息:
- RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
解決方案:升級一下numpy就可以了,即pip install numpy --upgrade