Open zijian98 opened 10 months ago
Vitis-AI 3.0
Hi, I am trying to perform QAT on yolov5 following this script: https://github.com/Xilinx/Vitis-AI/blob/v3.0/src/vai_quantizer/vai_q_pytorch/example/resnet18_qat.py
However, I encountered this error when trying to export to xmodel:
Traceback (most recent call last): File "quant_yolov5_QAT.py", line 30, in <module> qat_processor = QatProcessor(model, inputs) File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/pytorch_nndct/quantization/quant_aware_training.py", line 140, in __init__ device=self._device) File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/pytorch_nndct/qproc/base.py", line 182, in __init__ quantizer.setup(graph, False, lstm_app, custom_quant_ops=custom_quant_ops) File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/nndct_shared/quantization/base_quantizer.py", line 149, in setup custom_quant_ops=custom_quant_ops) File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/nndct_shared/quantization/quant_info.py", line 45, in __init__ self.group_graph() File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/nndct_shared/quantization/quant_info.py", line 81, in group_graph quant_groups = self.scan_commander[c](self.Nndctgraph, quant_groups) File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.7/site-packages/nndct_shared/quantization/commander.py", line 76, in SoftFuseReshape start_node = quant_groups[p.name][0] KeyError: 'DetectMultiBackend::DetectMultiBackend/DetectionModel[model]/Detect[model]/Detect[24]/DeQuantStub[dequant_stub]/10910'
Does anyone knows what is this error and how to solve this? Would appreciate it if someone could share some information on how to modify yolo.py during training.
Thank You!
Hello, did you manage to solve the issue please?
Vitis-AI 3.0
Hi, I am trying to perform QAT on yolov5 following this script: https://github.com/Xilinx/Vitis-AI/blob/v3.0/src/vai_quantizer/vai_q_pytorch/example/resnet18_qat.py
However, I encountered this error when trying to export to xmodel:
Does anyone knows what is this error and how to solve this? Would appreciate it if someone could share some information on how to modify yolo.py during training.
Thank You!