From feff2cdeb29ff76aeceb8f10a9e030e6fedf0475 Mon Sep 17 00:00:00 2001 From: Liufang Sang Date: Wed, 5 Feb 2020 20:41:49 -0600 Subject: [PATCH] fix bug from QA (#89) --- demo/imagenet_reader.py | 4 ++-- demo/quant/quant_aware/README.md | 2 +- demo/quant/quant_post/README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/imagenet_reader.py b/demo/imagenet_reader.py index 55512e4f..295ce218 100644 --- a/demo/imagenet_reader.py +++ b/demo/imagenet_reader.py @@ -156,8 +156,8 @@ def _reader_creator(file_list, for line in lines: if mode == 'train' or mode == 'val': img_path, label = line.split() - img_path = os.path.join(data_dir + "/" + mode, - img_path) + img_path = os.path.join( + os.path.join(data_dir, mode), img_path) yield img_path, int(label) elif mode == 'test': img_path = os.path.join(data_dir, line) diff --git a/demo/quant/quant_aware/README.md b/demo/quant/quant_aware/README.md index f7fa2686..407a8826 100644 --- a/demo/quant/quant_aware/README.md +++ b/demo/quant/quant_aware/README.md @@ -10,7 +10,7 @@ ### 准备数据 -在``demo``文件夹下创建``data``文件夹,将``ImageNet``数据集解压在``data``文件夹下,解压后``data``文件夹下应包含以下文件: +在``demo``文件夹下创建``data``文件夹,将``ImageNet``数据集解压在``data``文件夹下,解压后``data/ILSVRC2012``文件夹下应包含以下文件: - ``'train'``文件夹,训练图片 - ``'train_list.txt'``文件 - ``'val'``文件夹,验证图片 diff --git a/demo/quant/quant_post/README.md b/demo/quant/quant_post/README.md index 027bcf3d..cda54103 100755 --- a/demo/quant/quant_post/README.md +++ b/demo/quant/quant_post/README.md @@ -10,7 +10,7 @@ ### 准备数据 -在``demo``文件夹下创建``data``文件夹,将``ImageNet``数据集解压在``data``文件夹下,解压后``data``文件夹下应包含以下文件: +在``demo``文件夹下创建``data``文件夹,将``ImageNet``数据集解压在``data``文件夹下,解压后``data/ILSVRC2012``文件夹下应包含以下文件: - ``'train'``文件夹,训练图片 - ``'train_list.txt'``文件 - ``'val'``文件夹,验证图片 -- GitLab