参照官方介绍:https://torchmetrics.readthedocs.io/en/stable/?_ga=2.122525507.995535486.1657245724-2136649219.1657245724pytorch_lightning.metric已经无法使用安装,如果需要用
Accuracy, Precision, Recall, F1Score等功能,需要使用下面的语句
from torchmetrics import Accuracy, Precision, Recall, F1Score
安装方法分别为:
pip install torchmetrics
和
conda install -c conda-forge torchmetrics