提交 1a9500e6 编写于 作者: Y Yibing Liu

Rename optimizer

上级 28219f78
...@@ -125,9 +125,9 @@ def profile(args): ...@@ -125,9 +125,9 @@ def profile(args):
class_num=1749, class_num=1749,
parallel=args.parallel) parallel=args.parallel)
adam_optimizer = fluid.optimizer.Momentum( optimizer = fluid.optimizer.Momentum(
learning_rate=args.learning_rate, momentum=0.9) learning_rate=args.learning_rate, momentum=0.9)
adam_optimizer.minimize(avg_cost) optimizer.minimize(avg_cost)
place = fluid.CPUPlace() if args.device == 'CPU' else fluid.CUDAPlace(0) place = fluid.CPUPlace() if args.device == 'CPU' else fluid.CUDAPlace(0)
exe = fluid.Executor(place) exe = fluid.Executor(place)
......
...@@ -143,9 +143,9 @@ def train(args): ...@@ -143,9 +143,9 @@ def train(args):
class_num=1749, class_num=1749,
parallel=args.parallel) parallel=args.parallel)
adam_optimizer = fluid.optimizer.Momentum( optimizer = fluid.optimizer.Momentum(
learning_rate=args.learning_rate, momentum=0.9) learning_rate=args.learning_rate, momentum=0.9)
adam_optimizer.minimize(avg_cost) optimizer.minimize(avg_cost)
# program for test # program for test
test_program = fluid.default_main_program().clone() test_program = fluid.default_main_program().clone()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册