From d5ce14b58a8f874fef51d5b582b00f3efbc705db Mon Sep 17 00:00:00 2001 From: gengdongjie Date: Tue, 8 Sep 2020 10:01:36 +0800 Subject: [PATCH] remove parameter is_grad in resnet --- tutorials/tutorial_code/resnet/cifar_resnet50.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/tutorial_code/resnet/cifar_resnet50.py b/tutorials/tutorial_code/resnet/cifar_resnet50.py index 94cca8b4..cf6740e2 100644 --- a/tutorials/tutorial_code/resnet/cifar_resnet50.py +++ b/tutorials/tutorial_code/resnet/cifar_resnet50.py @@ -111,7 +111,7 @@ if __name__ == '__main__': epoch_size = args_opt.epoch_size net = resnet50(args_opt.batch_size, args_opt.num_classes) - ls = SoftmaxCrossEntropyWithLogits(sparse=True, is_grad=False, reduction="mean") + ls = SoftmaxCrossEntropyWithLogits(sparse=True, reduction="mean") opt = Momentum(filter(lambda x: x.requires_grad, net.get_parameters()), 0.01, 0.9) model = Model(net, loss_fn=ls, optimizer=opt, metrics={'acc'}) -- GitLab