modify momentum test

pull/981/head
changzherui 5 years ago
parent 48735c25ca
commit 446828f221

@ -38,7 +38,7 @@ def tensor_run_opt(opt, iters, learning_rate, momentum,
gradient, variable, moment):
""" tensor_run_opt """
success = True
new_weight = opt(variable, moment, learning_rate, gradient, momentum)
new_weight = opt(variable, moment, learning_rate, gradient, momentum)[0]
success = F.depend(success, F.assign(variable, new_weight))
return success

Loading…
Cancel
Save