算法包提供的 quant_analysis.py 是针对模型部署场景,在模型从从浮点(FP32)到量化(如 INT8)部署前的分析工具,执行工具会进行量化敏感度分析验证,支持单机多卡 / 多机分布式运行。
quant_analysis.py
运行 tools/quant_analysis.py 脚本,加载指定配置文件执行模型量化分析,输出分析结果至指定目录。
tools/quant_analysis.py
--config CONFIG, -c CONFIG
--device-ids DEVICE_IDS, -ids DEVICE_IDS
--dist-url DIST_URL
--backend
--launcher
python3 tools/quant_analysis.py \ -c ./configs/bev/bevformer_tiny_resnet50_detection_nuscenes.py \ -ids 0,1
config配置文件的详细介绍可参考config配置章节。