Browse Source

modify momentum test

tags/v0.3.0-alpha
changzherui 6 years ago
parent
commit
446828f221
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tests/ut/python/ops/test_momentum.py

+ 1
- 1
tests/ut/python/ops/test_momentum.py View File

@@ -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