repair unsuitable warning in repeat count and epoch size check

This commit is contained in:
ms_yan 2020-04-01 20:14:46 +08:00 committed by chang zherui
parent dcd1f0a504
commit 59d08edea7
1 changed files with 1 additions and 1 deletions
mindspore/train

View File

@ -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)