提交 24659091 编写于 作者: J JiabinYang

fix 01 branch wrong changes

上级 d5c501fa
......@@ -180,7 +180,7 @@ feed_order=['x', 'y']
除此之外,可以定义一个事件相应器来处理类似`打印训练进程`的事件:
```python
# Specify the directory path to save the parameters
# Specify the directory to save the parameters
params_dirname = "fit_a_line.inference.model"
# Plot data
......@@ -191,11 +191,11 @@ plot_cost = Ploter(train_title, test_title)
step = 0
# event_handler to print training and testing info
# event_handler prints training and testing info
def event_handler_plot(event):
global step
if isinstance(event, fluid.EndStepEvent):
if event.step % 10 == 0: # every 10 batches, record a test cost
if event.step % 10 == 0: # record the test cost every 10 seconds
test_metrics = trainer.test(
reader=test_reader, feed_order=feed_order)
......
01.fit_a_line/image/ranges.png

6.5 KB | W: | H:

01.fit_a_line/image/ranges.png

6.6 KB | W: | H:

01.fit_a_line/image/ranges.png
01.fit_a_line/image/ranges.png
01.fit_a_line/image/ranges.png
01.fit_a_line/image/ranges.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -222,7 +222,7 @@ feed_order=['x', 'y']
除此之外,可以定义一个事件相应器来处理类似`打印训练进程`的事件:
```python
# Specify the directory path to save the parameters
# Specify the directory to save the parameters
params_dirname = "fit_a_line.inference.model"
# Plot data
......@@ -233,11 +233,11 @@ plot_cost = Ploter(train_title, test_title)
step = 0
# event_handler to print training and testing info
# event_handler prints training and testing info
def event_handler_plot(event):
global step
if isinstance(event, fluid.EndStepEvent):
if event.step % 10 == 0: # every 10 batches, record a test cost
if event.step % 10 == 0: # record the test cost every 10 seconds
test_metrics = trainer.test(
reader=test_reader, feed_order=feed_order)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册