!6789 fix int in ckpt name changed to float bug

Merge pull request !6789 from caozhou/fix_ckpt_name_float
This commit is contained in:
mindspore-ci-bot 2020-09-24 09:36:30 +08:00 committed by Gitee
commit 04e2ab1b0b
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ class ModelCheckpoint(Callback):
return
save_ckpt = self._check_save_ckpt(cb_params, force_to_save)
step_num_in_epoch = (cb_params.cur_step_num - 1) % cb_params.batch_num + 1
step_num_in_epoch = int((cb_params.cur_step_num - 1) % cb_params.batch_num + 1)
if save_ckpt:
cur_ckpoint_file = self._prefix + "-" + str(cb_params.cur_epoch_num) + "_" \