From fd5084c6d4ca4b27e76a2440ad155d018e4fea3a Mon Sep 17 00:00:00 2001 From: whs Date: Mon, 9 Aug 2021 22:06:58 +0800 Subject: [PATCH] Fix ce of dygraph quant (#871) --- ce_tests/dygraph/quant/readme.md | 2 +- ce_tests/dygraph/quant/run_ptq.sh | 2 +- ce_tests/dygraph/quant/run_qat.sh | 4 ++-- ce_tests/dygraph/quant/src/ptq.py | 2 +- ce_tests/dygraph/quant/src/qat.py | 2 +- ce_tests/dygraph/quant/src/test.py | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ce_tests/dygraph/quant/readme.md b/ce_tests/dygraph/quant/readme.md index 4884d6d0..33826a72 100644 --- a/ce_tests/dygraph/quant/readme.md +++ b/ce_tests/dygraph/quant/readme.md @@ -2,7 +2,7 @@ 安装需要测试的Paddle版本和PaddleSlim版本。 -准备ImageNet数据集,数据集需要满足paddle hapi的要求。假定解压到`/dataset/ILSVRC2012`文件夹,该文件夹下有`train文件夹、val_hapi文件夹、train_list.txt和val_list.txt文件`。如果数据集有问题,可以私聊。 +准备ImageNet数据集,数据集需要满足paddle hapi的要求。假定解压到`/dataset/ILSVRC2012`文件夹,该文件夹下有`train文件夹、val文件夹、train_list.txt和val_list.txt文件`。 通过`export CUDA_VISIBLE_DEVICES=xx`指定需要使用的GPU ID。 diff --git a/ce_tests/dygraph/quant/run_ptq.sh b/ce_tests/dygraph/quant/run_ptq.sh index aabef03a..686ee525 100644 --- a/ce_tests/dygraph/quant/run_ptq.sh +++ b/ce_tests/dygraph/quant/run_ptq.sh @@ -1,4 +1,4 @@ -data_path="/dataset/ILSVRC2012" +data_path="/root/datasets/ILSVRC2012" quant_batch_num=10 quant_batch_size=10 diff --git a/ce_tests/dygraph/quant/run_qat.sh b/ce_tests/dygraph/quant/run_qat.sh index a100853e..2cc0ddd3 100644 --- a/ce_tests/dygraph/quant/run_qat.sh +++ b/ce_tests/dygraph/quant/run_qat.sh @@ -1,5 +1,5 @@ -data_path="/dataset/ILSVRC2012" -val_dir="val_hapi" +data_path="/root/datasets/ILSVRC2012" +val_dir="val" epoch=1 lr=0.0001 batch_size=32 diff --git a/ce_tests/dygraph/quant/src/ptq.py b/ce_tests/dygraph/quant/src/ptq.py index 2695ed0a..bb1138df 100644 --- a/ce_tests/dygraph/quant/src/ptq.py +++ b/ce_tests/dygraph/quant/src/ptq.py @@ -100,7 +100,7 @@ if __name__ == '__main__': ) parser.add_argument( '--val_dir', - default="val_hapi", + default="val", help='the dir that saves val images for paddle.Model') # train diff --git a/ce_tests/dygraph/quant/src/qat.py b/ce_tests/dygraph/quant/src/qat.py index e52b2fec..0737505f 100644 --- a/ce_tests/dygraph/quant/src/qat.py +++ b/ce_tests/dygraph/quant/src/qat.py @@ -154,7 +154,7 @@ if __name__ == '__main__': '(should have subdirectories named "train" and "val"') parser.add_argument( '--val_dir', - default="val_hapi", + default="val", help='the dir that saves val images for paddle.Model') # train diff --git a/ce_tests/dygraph/quant/src/test.py b/ce_tests/dygraph/quant/src/test.py index 1b05b4f0..0bd432ac 100644 --- a/ce_tests/dygraph/quant/src/test.py +++ b/ce_tests/dygraph/quant/src/test.py @@ -35,7 +35,7 @@ def eval(args): # prepare data val_dataset = dataset.ImageNetDataset( - path=os.path.join(args.data_dir, 'val_hapi'), mode='val') + path=os.path.join(args.data_dir, 'val'), mode='val') eval_loader = paddle.io.DataLoader( val_dataset, batch_size=args.batch_size, num_workers=5) -- GitLab