From 702cb6b04aeb53e3461568c95778668e8a45206e Mon Sep 17 00:00:00 2001 From: kinghuin Date: Wed, 17 Jul 2019 18:56:15 +0800 Subject: [PATCH] fix path error and add infer_3 url test=develop --- 02.recognize_digits/README.cn.md | 4 ++-- 02.recognize_digits/README.md | 4 ++-- 02.recognize_digits/index.cn.html | 4 ++-- 02.recognize_digits/index.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/02.recognize_digits/README.cn.md b/02.recognize_digits/README.cn.md index a1488b0..0c88a4f 100644 --- a/02.recognize_digits/README.cn.md +++ b/02.recognize_digits/README.cn.md @@ -524,7 +524,7 @@ Test with Epoch 0, avg_cost: 0.053097883707459624, acc: 0.9822850318471338 ### 生成预测输入数据 -`infer_3.png` 是数字 3 的一个示例图像。把它变成一个 numpy 数组以匹配数据feed格式。 +[infer_3.png](https://github.com/PaddlePaddle/book/blob/develop/02.recognize_digits/image/infer_3.png) 是数字 3 的一个示例图像。把它变成一个 numpy 数组以匹配数据feed格式。 ```python def load_image(file): @@ -558,7 +558,7 @@ with fluid.scope_guard(inference_scope): lab = numpy.argsort(results) # 打印 infer_3.png 这张图片的预测结果 - img=Image.open('image/infer_3.png') + img=Image.open(cur_dir + 'image/infer_3.png') plt.imshow(img) print("Inference result of image/infer_3.png is: %d" % lab[0][0][-1]) ``` diff --git a/02.recognize_digits/README.md b/02.recognize_digits/README.md index 7fc2313..1776b1d 100644 --- a/02.recognize_digits/README.md +++ b/02.recognize_digits/README.md @@ -508,7 +508,7 @@ You can use trained model to classify handwriting pictures of digits. The progra ### Generate input data to be inferred -`infer_3.png` is an example picture of number 3. Transform it into a numpy to match feed data format +[infer_3.png](https://github.com/PaddlePaddle/book/blob/develop/02.recognize_digits/image/infer_3.png) is an example picture of number 3. Transform it into a numpy to match feed data format ```python @@ -547,7 +547,7 @@ with fluid.scope_guard(inference_scope): lab = numpy.argsort(results) # Print prediction result of infer_3.png - img=Image.open('image/infer_3.png') + img=Image.open(cur_dir + 'image/infer_3.png') plt.imshow(img) print("Inference result of image/infer_3.png is: %d" % lab[0][0][-1]) ``` diff --git a/02.recognize_digits/index.cn.html b/02.recognize_digits/index.cn.html index 1fb5d5c..3417fa5 100644 --- a/02.recognize_digits/index.cn.html +++ b/02.recognize_digits/index.cn.html @@ -566,7 +566,7 @@ Test with Epoch 0, avg_cost: 0.053097883707459624, acc: 0.9822850318471338 ### 生成预测输入数据 -`infer_3.png` 是数字 3 的一个示例图像。把它变成一个 numpy 数组以匹配数据feed格式。 +[infer_3.png](https://github.com/PaddlePaddle/book/blob/develop/02.recognize_digits/image/infer_3.png) 是数字 3 的一个示例图像。把它变成一个 numpy 数组以匹配数据feed格式。 ```python def load_image(file): @@ -600,7 +600,7 @@ with fluid.scope_guard(inference_scope): lab = numpy.argsort(results) # 打印 infer_3.png 这张图片的预测结果 - img=Image.open('image/infer_3.png') + img=Image.open(cur_dir + 'image/infer_3.png') plt.imshow(img) print("Inference result of image/infer_3.png is: %d" % lab[0][0][-1]) ``` diff --git a/02.recognize_digits/index.html b/02.recognize_digits/index.html index bf42873..a09d04b 100644 --- a/02.recognize_digits/index.html +++ b/02.recognize_digits/index.html @@ -550,7 +550,7 @@ You can use trained model to classify handwriting pictures of digits. The progra ### Generate input data to be inferred -`infer_3.png` is an example picture of number 3. Transform it into a numpy to match feed data format +[infer_3.png](https://github.com/PaddlePaddle/book/blob/develop/02.recognize_digits/image/infer_3.png) is an example picture of number 3. Transform it into a numpy to match feed data format ```python @@ -589,7 +589,7 @@ with fluid.scope_guard(inference_scope): lab = numpy.argsort(results) # Print prediction result of infer_3.png - img=Image.open('image/infer_3.png') + img=Image.open(cur_dir + 'image/infer_3.png') plt.imshow(img) print("Inference result of image/infer_3.png is: %d" % lab[0][0][-1]) ``` -- GitLab