参照官方介绍: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

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐