!4308 fix resnet_gpu distribute init

Merge pull request !4308 from yuchaojie/fix_resnet_gpu_distribute_init
This commit is contained in:
mindspore-ci-bot 2020-08-12 09:15:18 +08:00 committed by Gitee
commit 637018cb6a
1 changed files with 1 additions and 1 deletions

View File

@ -81,11 +81,11 @@ if __name__ == '__main__':
init()
# GPU target
else:
init("nccl")
context.set_auto_parallel_context(device_num=get_group_size(), parallel_mode=ParallelMode.DATA_PARALLEL,
mirror_mean=True)
if args_opt.net == "resnet50":
auto_parallel_context().set_all_reduce_fusion_split_indices([85, 160])
init("nccl")
ckpt_save_dir = config.save_checkpoint_path + "ckpt_" + str(get_rank()) + "/"
# create dataset