Run code on the server and found
ImportError: No module named 'sklearn.metrsics'
After the list pip found the sklearn already installed,
Reloading does not work after uninstallation.
Finally, change a little, calling sequence,
Change the order before,
import torch
from sklearn.metrics import confusion_matrix
Order after the change
from sklearn.metrics import confusion_matrix
import torch