提交 d5ce14b5 编写于 作者: G gengdongjie

remove parameter is_grad in resnet

上级 e69ef85d
......@@ -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'})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册