From f38ca01dfd8201dfc1374ff973a0aff46665bac8 Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 13 Apr 2023 10:22:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'train.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get_metrics用法适配最新版本ms2.0 --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index fece2a5..3be2ffc 100644 --- a/train.py +++ b/train.py @@ -170,12 +170,12 @@ if __name__ == "__main__": model = Model(network, net_loss, net_opt, - metrics={"accuracy": Accuracy()}) + metrics={"accuracy"}) else: model = Model(network, net_loss, net_opt, - metrics={"accuracy": Accuracy()}, + metrics={"accuracy"}, amp_level="O2") config_ck = CheckpointConfig(