fix getdatasetsize error II

This commit is contained in:
panfengfeng 2020-07-25 11:01:12 +08:00
parent 669a8969c7
commit 57eab288cd
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
from collections.abc import Iterable
import os
import math
import numpy as np
from mindspore import log as logger
@ -402,7 +403,7 @@ class Model:
if sink_size == -1:
epoch_num = epoch
else:
epoch_num = epoch * sink_size // train_dataset.get_dataset_size()
epoch_num = math.ceil(epoch * sink_size / train_dataset.get_dataset_size())
dataset_helper, train_network = self._exec_preprocess(self._train_network,
is_train=True,