change enable_data_sink value to true for transformer

This commit is contained in:
yuchaojie 2020-08-27 09:31:44 +08:00
parent 5fc18b9833
commit 15b366307e
3 changed files with 4 additions and 3 deletions

View File

@ -52,7 +52,7 @@ do
--enable_save_ckpt="true" \
--enable_lossscale="true" \
--do_shuffle="true" \
--enable_data_sink="false" \
--enable_data_sink="true" \
--checkpoint_path="" \
--save_checkpoint_steps=2500 \
--save_checkpoint_num=30 \

View File

@ -37,7 +37,7 @@ python train.py \
--enable_save_ckpt="true" \
--enable_lossscale="true" \
--do_shuffle="true" \
--enable_data_sink="false" \
--enable_data_sink="true" \
--checkpoint_path="" \
--save_checkpoint_steps=2500 \
--save_checkpoint_num=30 \

View File

@ -166,7 +166,8 @@ def run_transformer_train():
netwithgrads.set_train(True)
model = Model(netwithgrads)
model.train(args.epoch_size, dataset, callbacks=callbacks, dataset_sink_mode=(args.enable_data_sink == "true"))
model.train(args.epoch_size, dataset, callbacks=callbacks, dataset_sink_mode=(args.enable_data_sink == "true"),
sink_size=args.save_checkpoint_steps)
if __name__ == '__main__':
run_transformer_train()