提交 ed0693fe 编写于 作者: D Dun Liang

Fix : optimizer_func is not callable

上级 63b5ec3f
......@@ -157,7 +157,7 @@ place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace()
trainer = fluid.Trainer(
train_func=train_program,
place=place,
optimizer_func=fluid.optimizer.SGD(learning_rate=0.001))
optimizer_func=lambda : fluid.optimizer.SGD(learning_rate=0.001))
```
### 开始提供数据
......
......@@ -165,7 +165,7 @@ The trainer will take the `train_program` as input.
trainer = fluid.Trainer(
train_func=train_program,
place=place,
optimizer_func=fluid.optimizer.SGD(learning_rate=0.001))
optimizer_func=lambda : fluid.optimizer.SGD(learning_rate=0.001))
```
### Feeding Data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册