PaddlePaddle / PaddlePaddle/FastDeploy
量化时loss为NaN
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 756
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 4
Description
环境
- 【FastDeploy版本】:fastdeploy-tools 0.0.1 paddlepaddle-gpu2.4.2 paddleslim2.4.0
- 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
- 【系统平台】: Linux x64(Ubuntu 20.04)
- 【硬件】: Nvidia GPU 4090、3090Ti, CUDA 11.2 CUDNN 8.2.1
- 【编译语言】: C++ / Python3.8
问题
在进行模型QAT量化时,经常出现如下问题,前几轮还算正常,但后面的loss就变成了nan,最后导致量化失败。
使用的命令:fastdeploy compress --config_path=./configs/detection/yolov7_quant.yaml --method='QAT' --save_dir='./yolov7_qat_model/'
配置文件cofig:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the QAT run with configs/detection/yolov7_quant.yaml using the reported fastdeploy compress command and the listed environment. Inspect the configuration and training output around the point where loss becomes NaN. Done means the QAT run completes without NaN loss and produces the quantized model.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100