Skip to content

Commit 52e2eb6

Browse files
authored
Fix function in fit-a-line with new API (#11020)
1 parent fae3d8d commit 52e2eb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/paddle/fluid/tests/book/high-level-api/fit_a_line/test_fit_a_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def inference_program():
3838
return y_predict
3939

4040

41-
def linear():
41+
def train_program():
4242
y = fluid.layers.data(name='y', shape=[1], dtype='float32')
4343
y_predict = inference_program()
4444

@@ -104,7 +104,7 @@ def main(use_cuda):
104104
# Directory for saving the trained model
105105
params_dirname = "fit_a_line.inference.model"
106106

107-
train(use_cuda, linear, params_dirname)
107+
train(use_cuda, train_program, params_dirname)
108108
infer(use_cuda, inference_program, params_dirname)
109109

110110

0 commit comments

Comments
 (0)