From b4b1c55ed20144eb99e549dd51d9d01cd4ec7edb Mon Sep 17 00:00:00 2001 From: ms_yan <6576637+ms_yan@user.noreply.gitee.com> Date: Wed, 1 Apr 2020 20:14:46 +0800 Subject: [PATCH] repair unsuitable warning in repeat count and epoch size check --- mindspore/train/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/train/model.py b/mindspore/train/model.py index fe655433faa..4174632cece 100755 --- a/mindspore/train/model.py +++ b/mindspore/train/model.py @@ -372,7 +372,7 @@ class Model: >>> model.train(2, dataset) """ repeat_count = train_dataset.get_repeat_count() - if epoch != repeat_count: + if epoch != repeat_count and dataset_sink_mode is True: logger.warning(f"The epoch_size {epoch} is not the same with dataset repeat_count {repeat_count}") check_bool(dataset_sink_mode) _device_number_check(self._parallel_mode, self._device_number)