!84 dataset: repair unsuitable warning in repeat count and epoch size check

Merge pull request !84 from ms_yan/epoch_repeat_check
This commit is contained in:
mindspore-ci-bot 2020-04-02 10:58:47 +08:00 committed by Gitee
commit 1857dacac2
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ class Model:
>>> model.train(2, dataset) >>> model.train(2, dataset)
""" """
repeat_count = train_dataset.get_repeat_count() 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}") logger.warning(f"The epoch_size {epoch} is not the same with dataset repeat_count {repeat_count}")
check_bool(dataset_sink_mode) check_bool(dataset_sink_mode)
_device_number_check(self._parallel_mode, self._device_number) _device_number_check(self._parallel_mode, self._device_number)