在服務器上跑代碼,發現
ImportError: No module named 'sklearn.metrsics'
pip list 後發現,已經安裝了sklearn,
卸載後重裝也不行。
最後更改了一下,調用的順序,
更改之前 的順序,
import torch
from sklearn.metrics import confusion_matrix
更改之後的順序
from sklearn.metrics import confusion_matrix
import torch