提交 3c142b3a 编写于 作者: G gengdongjie

remove paramete is_grad in resnet

上级 024dc819
......@@ -119,7 +119,7 @@ if __name__ == '__main__':
epoch_size = args_opt.epoch_size
net = resnet50(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.
先完成此消息的编辑!
想要评论请 注册