ModelTC/MQBench

使用MQBench进行PTQ量化不清楚是否量化成功?

Closed this issue · 4 comments

嗨 大家好,

我想得到使用TensorRT量化方式进行量化后,能够达到MQBench官方精度的resnet50网络

但是我没有找到(如果您有量化后的网络,并能够分享给我,我不胜感激)

为此,我按照官方提供的步骤进行处理

Clone and install MQBench;

Prepare the ImageNet dataset from [the official website](http://www.image-net.org/) and move validation images to labeled subfolders, using the following [shell script](https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh);

Download pre-trained models from our [release](https://github.com/ModelTC/MQBench/releases/tag/pre-trained);

Check out /path-of-MQBench/application/imagenet_example/PTQ/configs and find yaml file you want to reproduce;

Replace /path-of-pretained and /path-of-imagenet in yaml file;

Change directory, cd /path-of-MQBench/application/imagenet_example/PTQ/ptq;

Exec python ptq.py --config /path-of-config.yaml.

链接:

当我按照以上步骤配置完成后,

运行:python ptq.py --config './min_max/r50_8_8.yaml'

在运行到:

Test: [0/79] Time 1.046 (1.046) Acc@1 95.31 (95.31) Acc@5 100.00 (100.00)
*Acc@1 94.440 Acc@5 99.300

程序就结束运行了,我看到[0/79], 可能觉得模型并没有量化完成

但是没有提示任何错误信息

也没有找到量化后的模型。或者量化后的结果文件。

不清楚大家是否都是这样,还是说我操作有误?

当我在ptq.py文件中打入断点,打印的模型确实是量化后的模型。希望能够得到指正,谢谢!

Test阶段没有成功,可以看下是不是OOM了,或者跳过Test

非常感谢您的回复,我检查一下。

非常感谢@Tracin, 是OOM的问题,只是没有提示,目前能够work.

This issue has not received any updates in 120 days. Please reply to this issue if this still unresolved!