修改evaluate_dataloader的报错信息

This commit is contained in:
x54-729 2022-04-15 06:57:31 +00:00
parent f27d53261c
commit 9d50e99bfb

View File

@ -219,10 +219,10 @@ class Trainer(TrainerEventTrigger):
""" 设置内部的 Evaluator """ """ 设置内部的 Evaluator """
if metrics is None and evaluate_dataloaders is not None: if metrics is None and evaluate_dataloaders is not None:
raise ValueError("You have set 'validate_dataloader' but forget to set 'metrics'.") raise ValueError("You have set 'evaluate_dataloader' but forget to set 'metrics'.")
if metrics is not None and evaluate_dataloaders is None: if metrics is not None and evaluate_dataloaders is None:
raise ValueError("You have set 'metrics' but forget to set 'validate_dataloader'.") raise ValueError("You have set 'metrics' but forget to set 'evaluate_dataloader'.")
self.evaluator = None self.evaluator = None
self.monitor = monitor self.monitor = monitor