提交 ed270282 编写于 作者: T Tao Luo 提交者: GitHub

Merge pull request #357 from PaddlePaddle/docker_book

fix 02.recognize_digits notebook error
...@@ -325,7 +325,7 @@ def load_image(file): ...@@ -325,7 +325,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/infer_3.png'),)) test_data.append((load_image(cur_dir + '/image/infer_3.png'),))
probs = paddle.infer( probs = paddle.infer(
......
...@@ -329,7 +329,7 @@ def load_image(file): ...@@ -329,7 +329,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/infer_3.png'),)) test_data.append((load_image(cur_dir + '/image/infer_3.png'),))
probs = paddle.infer( probs = paddle.infer(
......
...@@ -367,7 +367,7 @@ def load_image(file): ...@@ -367,7 +367,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/infer_3.png'),)) test_data.append((load_image(cur_dir + '/image/infer_3.png'),))
probs = paddle.infer( probs = paddle.infer(
......
...@@ -371,7 +371,7 @@ def load_image(file): ...@@ -371,7 +371,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/infer_3.png'),)) test_data.append((load_image(cur_dir + '/image/infer_3.png'),))
probs = paddle.infer( probs = paddle.infer(
......
...@@ -494,7 +494,7 @@ def load_image(file): ...@@ -494,7 +494,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/dog.png'),)) test_data.append((load_image(cur_dir + '/image/dog.png'),))
# with open('params_pass_50.tar', 'r') as f: # with open('params_pass_50.tar', 'r') as f:
......
...@@ -503,7 +503,7 @@ def load_image(file): ...@@ -503,7 +503,7 @@ def load_image(file):
im = im / 255.0 im = im / 255.0
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/dog.png'),)) test_data.append((load_image(cur_dir + '/image/dog.png'),))
# users can remove the comments and change the model name # users can remove the comments and change the model name
......
...@@ -536,7 +536,7 @@ def load_image(file): ...@@ -536,7 +536,7 @@ def load_image(file):
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/dog.png'),)) test_data.append((load_image(cur_dir + '/image/dog.png'),))
# with open('params_pass_50.tar', 'r') as f: # with open('params_pass_50.tar', 'r') as f:
......
...@@ -545,7 +545,7 @@ def load_image(file): ...@@ -545,7 +545,7 @@ def load_image(file):
im = im / 255.0 im = im / 255.0
return im return im
test_data = [] test_data = []
cur_dir = os.path.dirname(os.path.realpath(__file__)) cur_dir = os.getcwd()
test_data.append((load_image(cur_dir + '/image/dog.png'),)) test_data.append((load_image(cur_dir + '/image/dog.png'),))
# users can remove the comments and change the model name # users can remove the comments and change the model name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册