未验证 提交 fd5084c6 编写于 作者: W whs 提交者: GitHub

Fix ce of dygraph quant (#871)

上级 e3663d26
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
安装需要测试的Paddle版本和PaddleSlim版本。 安装需要测试的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。 通过`export CUDA_VISIBLE_DEVICES=xx`指定需要使用的GPU ID。
......
data_path="/dataset/ILSVRC2012" data_path="/root/datasets/ILSVRC2012"
quant_batch_num=10 quant_batch_num=10
quant_batch_size=10 quant_batch_size=10
......
data_path="/dataset/ILSVRC2012" data_path="/root/datasets/ILSVRC2012"
val_dir="val_hapi" val_dir="val"
epoch=1 epoch=1
lr=0.0001 lr=0.0001
batch_size=32 batch_size=32
......
...@@ -100,7 +100,7 @@ if __name__ == '__main__': ...@@ -100,7 +100,7 @@ if __name__ == '__main__':
) )
parser.add_argument( parser.add_argument(
'--val_dir', '--val_dir',
default="val_hapi", default="val",
help='the dir that saves val images for paddle.Model') help='the dir that saves val images for paddle.Model')
# train # train
......
...@@ -154,7 +154,7 @@ if __name__ == '__main__': ...@@ -154,7 +154,7 @@ if __name__ == '__main__':
'(should have subdirectories named "train" and "val"') '(should have subdirectories named "train" and "val"')
parser.add_argument( parser.add_argument(
'--val_dir', '--val_dir',
default="val_hapi", default="val",
help='the dir that saves val images for paddle.Model') help='the dir that saves val images for paddle.Model')
# train # train
......
...@@ -35,7 +35,7 @@ def eval(args): ...@@ -35,7 +35,7 @@ def eval(args):
# prepare data # prepare data
val_dataset = dataset.ImageNetDataset( 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( eval_loader = paddle.io.DataLoader(
val_dataset, batch_size=args.batch_size, num_workers=5) val_dataset, batch_size=args.batch_size, num_workers=5)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册