提交 f68c098a 编写于 作者: littletomatodonkey's avatar littletomatodonkey 提交者: Tingquan Gao

fix train acc log

上级 eee3ca70
......@@ -171,7 +171,9 @@ class Engine(object):
if metric_config is not None:
metric_config = metric_config.get("Train")
if metric_config is not None:
if hasattr(self.train_dataloader, "collate_fn"):
if hasattr(
self.train_dataloader, "collate_fn"
) and self.train_dataloader.collate_fn is not None:
for m_idx, m in enumerate(metric_config):
if "TopkAcc" in m:
msg = f"'TopkAcc' metric can not be used when setting 'batch_transform_ops' in config. The 'TopkAcc' metric has been removed."
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册