diff --git a/02.recognize_digits/README.cn.md b/02.recognize_digits/README.cn.md index a1488b003d21468602e0d681f6d12a2c475fbbd7..0c88a4f6c0a50ac54aacd09be03b89889d68343d 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 7fc23137fbaf2e750fbf4a28b1507d6b44ff2092..1776b1dc89366fcd36001e3ddebdc192e2131e4e 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 1fb5d5cb06cfceec6f5c75e99a9d4f7ea06eedd6..3417fa5b326fa8e3515dc6c61da670d0220336eb 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 bf428731efa54ac76f205ff79840d1cfcd211670..a09d04b01a43fd504d7565b620eaabfd0f21f2a6 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]) ```