diff --git a/02.recognize_digits/README.cn.md b/02.recognize_digits/README.cn.md index 742f265de34f0f78e2211fcd81f1a052635dd424..15a227a340db9654e8ba38446329d17b5a0f7330 100644 --- a/02.recognize_digits/README.cn.md +++ b/02.recognize_digits/README.cn.md @@ -326,7 +326,7 @@ def load_image(file): return im 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'),)) probs = paddle.infer( diff --git a/02.recognize_digits/README.md b/02.recognize_digits/README.md index 0b7b20704e804f538d60d544e11f405101d10715..58043138a710a9bf5934258d3a0a53c1c744e92b 100644 --- a/02.recognize_digits/README.md +++ b/02.recognize_digits/README.md @@ -330,7 +330,7 @@ def load_image(file): return im 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'),)) probs = paddle.infer( diff --git a/02.recognize_digits/index.cn.html b/02.recognize_digits/index.cn.html index bb4207232e330cc0e0efc3feb328c5bc4af04207..f2ad31c6008ba878d68740a80f3832570e0dbdf3 100644 --- a/02.recognize_digits/index.cn.html +++ b/02.recognize_digits/index.cn.html @@ -367,7 +367,7 @@ def load_image(file): im = im / 255.0 return im -test_data = [] +test_data = [] cur_dir = os.getcwd() test_data.append((load_image(cur_dir + '/image/infer_3.png'),)) diff --git a/03.image_classification/README.cn.md b/03.image_classification/README.cn.md index a4fe6c67cd6367a7b88f2a0df355c9dd89649e31..46bc13fbb61387dc5846d369c1494d8b24703c85 100644 --- a/03.image_classification/README.cn.md +++ b/03.image_classification/README.cn.md @@ -495,7 +495,7 @@ def load_image(file): return im 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'),) # with gzip.open('params_pass_50.tar.gz', 'r') as f: diff --git a/03.image_classification/README.md b/03.image_classification/README.md index 93c9ef71a8aacf449564b1dbbc0424dde68cdcb3..95dc153280ed44308e7f137b60762c30da8819de 100644 --- a/03.image_classification/README.md +++ b/03.image_classification/README.md @@ -504,7 +504,7 @@ def load_image(file): im = im / 255.0 return im 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'),) # users can remove the comments and change the model name diff --git a/03.image_classification/index.cn.html b/03.image_classification/index.cn.html index 82b77bca4a792437eb749232676840163d17b9ed..116c4b4191fa63bd3fb6fc18f35065d1bc7cada5 100644 --- a/03.image_classification/index.cn.html +++ b/03.image_classification/index.cn.html @@ -537,7 +537,7 @@ def load_image(file): return im 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'),) # with gzip.open('params_pass_50.tar.gz', 'r') as f: diff --git a/03.image_classification/index.html b/03.image_classification/index.html index 4c2da38ceadea0d6691024ab2ad3ba86fd9f13da..82da33c4a05e5f6a65a2b7b182a5fc66164934c3 100644 --- a/03.image_classification/index.html +++ b/03.image_classification/index.html @@ -546,7 +546,7 @@ def load_image(file): im = im / 255.0 return im 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'),) # users can remove the comments and change the model name