!828 Add reduce mean in SoftmaxCrossEntroyWithLogits in Resnet50 example

Merge pull request !828 from gengdongjie/r0.2
This commit is contained in:
mindspore-ci-bot 2020-04-29 08:44:01 +08:00 committed by Gitee
commit 88c32a6f4d
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ if __name__ == '__main__':
epoch_size = config.epoch_size
net = resnet50(class_num=config.class_num)
loss = SoftmaxCrossEntropyWithLogits(sparse=True)
loss = SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean")
if args_opt.do_train: