未验证 提交 3e1385ba 编写于 作者: C Cheerego 提交者: GitHub

Merge pull request #651 from junjun315/fix-book

Fix book bug
......@@ -223,16 +223,16 @@ for pass_id in range(num_epochs):
feed=feeder.feed(data_train),
fetch_list=[avg_loss])
if step % 10 == 0: # record a train cost every 10 batches
plot_cost.append(train_prompt, step, avg_loss_value[0])
plot_cost.plot()
plot_prompt.append(train_prompt, step, avg_loss_value[0])
plot_prompt.plot()
if step % 100 == 0: # record a test cost every 100 batches
test_metics = train_test(executor=exe_test,
program=test_program,
reader=test_reader,
fetch_list=[avg_loss.name],
feeder=feeder)
plot_cost.append(test_prompt, step, test_metics[0])
plot_cost.plot()
plot_prompt.append(test_prompt, step, test_metics[0])
plot_prompt.plot()
# If the accuracy is good enough, we can stop the training.
if test_metics[0] < 10.0:
break
......
......@@ -265,16 +265,16 @@ for pass_id in range(num_epochs):
feed=feeder.feed(data_train),
fetch_list=[avg_loss])
if step % 10 == 0: # record a train cost every 10 batches
plot_cost.append(train_prompt, step, avg_loss_value[0])
plot_cost.plot()
plot_prompt.append(train_prompt, step, avg_loss_value[0])
plot_prompt.plot()
if step % 100 == 0: # record a test cost every 100 batches
test_metics = train_test(executor=exe_test,
program=test_program,
reader=test_reader,
fetch_list=[avg_loss.name],
feeder=feeder)
plot_cost.append(test_prompt, step, test_metics[0])
plot_cost.plot()
plot_prompt.append(test_prompt, step, test_metics[0])
plot_prompt.plot()
# If the accuracy is good enough, we can stop the training.
if test_metics[0] < 10.0:
break
......
......@@ -29,10 +29,10 @@ docker run -d -p 8888:8888 paddlepaddle/book
会从DockerHub.com下载和运行本书的Docker image。阅读和在线编辑本书请在浏览器里访问 http://localhost:8888 。
如果您访问DockerHub.com很慢,可以试试我们的另一个镜像docker.paddlepaddlehub.com:
如果您访问DockerHub.com很慢,可以试试我们的另一个镜像hub.baidubce.com:
```bash
docker run -d -p 8888:8888 docker.paddlepaddlehub.com/book
docker run -d -p 8888:8888 hub.baidubce.com/paddlepaddle/book
```
### 使用GPU训练
......@@ -46,7 +46,7 @@ nvidia-docker run -d -p 8888:8888 paddlepaddle/book:latest-gpu
或者使用国内的镜像请运行:
```bash
nvidia-docker run -d -p 8888:8888 docker.paddlepaddlehub.com/book:latest-gpu
nvidia-docker run -d -p 8888:8888 hub.baidubce.com/paddlepaddle/book:latest-gpu
```
还需要将以下代码
......
......@@ -28,10 +28,10 @@ docker run -d -p 8888:8888 paddlepaddle/book
This command will download the pre-built Docker image from DockerHub.com and run it in a container. Please direct your Web browser to http://localhost:8888 to read the book.
If you are living in somewhere slow to access DockerHub.com, you might try our mirror server docker.paddlepaddlehub.com:
If you are living in somewhere slow to access DockerHub.com, you might try our mirror server hub.baidubce.com:
```bash
docker run -d -p 8888:8888 docker.paddlepaddlehub.com/book
docker run -d -p 8888:8888 hub.baidubce.com/paddlepaddle/book
```
......@@ -49,7 +49,7 @@ nvidia-docker run -d -p 8888:8888 paddlepaddle/book:latest-gpu
Or you can use the image registry mirror in China:
```bash
nvidia-docker run -d -p 8888:8888 docker.paddlepaddlehub.com/book:latest-gpu
nvidia-docker run -d -p 8888:8888 hub.baidubce.com/paddlepaddle/book:latest-gpu
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册