提交 44f1fff6 编写于 作者: C chengduoZH

fix 'cur_dir'

上级 526d4382
...@@ -326,7 +326,7 @@ def load_image(file): ...@@ -326,7 +326,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(
......
...@@ -330,7 +330,7 @@ def load_image(file): ...@@ -330,7 +330,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):
im = im / 255.0 im = im / 255.0
return im return im
test_data = [] test_data = []
cur_dir = os.getcwd() 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'),))
......
...@@ -495,7 +495,7 @@ def load_image(file): ...@@ -495,7 +495,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 gzip.open('params_pass_50.tar.gz', 'r') as f: # with gzip.open('params_pass_50.tar.gz', 'r') as f:
......
...@@ -504,7 +504,7 @@ def load_image(file): ...@@ -504,7 +504,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
......
...@@ -537,7 +537,7 @@ def load_image(file): ...@@ -537,7 +537,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 gzip.open('params_pass_50.tar.gz', 'r') as f: # with gzip.open('params_pass_50.tar.gz', 'r') as f:
......
...@@ -546,7 +546,7 @@ def load_image(file): ...@@ -546,7 +546,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.
先完成此消息的编辑!
想要评论请 注册