From ed0693fe27ead2c82a94aa5bfe42e62e7cafcb82 Mon Sep 17 00:00:00 2001 From: Dun Liang Date: Mon, 2 Jul 2018 13:03:28 +0800 Subject: [PATCH] Fix : optimizer_func is not callable --- 01.fit_a_line/README.cn.md | 2 +- 01.fit_a_line/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/01.fit_a_line/README.cn.md b/01.fit_a_line/README.cn.md index 87ab885..69f1aee 100644 --- a/01.fit_a_line/README.cn.md +++ b/01.fit_a_line/README.cn.md @@ -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)) ``` ### 开始提供数据 diff --git a/01.fit_a_line/README.md b/01.fit_a_line/README.md index df624f9..9d333ad 100644 --- a/01.fit_a_line/README.md +++ b/01.fit_a_line/README.md @@ -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 -- GitLab