Open lrp123456 opened 1 year ago
使用PaddleSlim量化Cascade RCNN模型(主干网络为swin v1、颈部网络为Bifpn) 模型文件: 链接:https://pan.baidu.com/s/1o3JSFo_fxO0nqYrU5koPqA 提取码:weyu --来自百度网盘超级会员V6的分享 训练配置: 配置.zip 量化配置: slim: QAT
QAT: quant_config: { 'weight_quantize_type': 'channel_wise_abs_max', 'activation_quantize_type': 'moving_average_abs_max', 'weight_bits': 8, 'activation_bits': 8, 'dtype': 'int8', 'window_size': 10000, 'moving_rate': 0.9, 'quantizable_layer_type': ['Conv2D', 'Linear']} print_model: True
epoch: 5
LearningRate: base_lr: 0.001 schedulers:
trt set dynamic shape done!
0 paddle_infer::Predictor::Predictor(paddle::AnalysisConfig const&) 1 std::unique_ptr<paddle::PaddlePredictor, std::default_delete > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&) 2 paddle::AnalysisPredictor::Init(std::shared_ptr const&, std::shared_ptr const&) 3 paddle::AnalysisPredictor::PrepareProgram(std::shared_ptr const&) 4 paddle::AnalysisPredictor::OptimizeInferenceProgram() 5 paddle::inference::analysis::Analyzer::RunAnalysis(paddle::inference::analysis::Argument) 6 paddle::inference::analysis::IrAnalysisPass::RunImpl(paddle::inference::analysis::Argument) 7 paddle::inference::analysis::IRPassManager::Apply(std::unique_ptr<paddle::framework::ir::Graph, std::default_delete >) 8 paddle::framework::ir::Pass::Apply(paddle::framework::ir::Graph) const 9 paddle::inference::analysis::TensorRtSubgraphPass::ApplyImpl(paddle::framework::ir::Graph) const 10 paddle::framework::ir::SubGraphFuser::ReplaceNodesWithSubGraphs() 11 paddle::framework::ir::SubgraphDetector::operator()() 12 paddle::framework::ir::SubgraphDetector::MarkNodesInsideSubGraph() 13 paddle::inference::tensorrt::OpTeller::Tell(paddle::framework::ir::Node const*, bool, bool) 14 paddle::inference::tensorrt::SimpleOpTypeSetTeller::operator()(paddle::framework::OpDesc const&, bool, bool)
@xiaoxiaohehe001 请问您有解决方案吗
bug描述 Describe the Bug
使用PaddleSlim量化Cascade RCNN模型(主干网络为swin v1、颈部网络为Bifpn) 模型文件: 链接:https://pan.baidu.com/s/1o3JSFo_fxO0nqYrU5koPqA 提取码:weyu --来自百度网盘超级会员V6的分享 训练配置: 配置.zip 量化配置: slim: QAT
QAT: quant_config: { 'weight_quantize_type': 'channel_wise_abs_max', 'activation_quantize_type': 'moving_average_abs_max', 'weight_bits': 8, 'activation_bits': 8, 'dtype': 'int8', 'window_size': 10000, 'moving_rate': 0.9, 'quantizable_layer_type': ['Conv2D', 'Linear']} print_model: True
epoch: 5
LearningRate: base_lr: 0.001 schedulers:
其他补充信息 Additional Supplementary Information
----------- Running Arguments ----------- action_file: None batch_size: 1 camera_id: -1 combine_method: nms cpu_threads: 1 device: GPU enable_mkldnn: False enable_mkldnn_bfloat16: False image_dir: demo image_file: None match_metric: ios match_threshold: 0.6 model_dir: /HOME/scz0p8n/run/PaddleDetection/inference_model/my_quant_swin output_dir: output overlap_ratio: [0.25, 0.25] random_pad: False reid_batch_size: 50 reid_model_dir: None run_benchmark: True run_mode: trt_int8 save_images: True save_mot_txt_per_img: False save_mot_txts: False save_results: False scaled: False slice_infer: False slice_size: [640, 640] threshold: 0.5 tracker_config: None trt_calib_mode: False trt_max_shape: 1280 trt_min_shape: 1 trt_opt_shape: 640 use_coco_category: False use_dark: True use_gpu: False video_file: None window_size: 50
----------- Model Configuration ----------- Model Arch: RCNN Transform Order: --transform op: Resize --transform op: NormalizeImage --transform op: Permute --transform op: PadStride
trt set dynamic shape done!
C++ Traceback (most recent call last):
0 paddle_infer::Predictor::Predictor(paddle::AnalysisConfig const&) 1 std::unique_ptr<paddle::PaddlePredictor, std::default_delete > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&)
2 paddle::AnalysisPredictor::Init(std::shared_ptr const&, std::shared_ptr const&)
3 paddle::AnalysisPredictor::PrepareProgram(std::shared_ptr const&)
4 paddle::AnalysisPredictor::OptimizeInferenceProgram()
5 paddle::inference::analysis::Analyzer::RunAnalysis(paddle::inference::analysis::Argument)
6 paddle::inference::analysis::IrAnalysisPass::RunImpl(paddle::inference::analysis::Argument)
7 paddle::inference::analysis::IRPassManager::Apply(std::unique_ptr<paddle::framework::ir::Graph, std::default_delete >)
8 paddle::framework::ir::Pass::Apply(paddle::framework::ir::Graph) const
9 paddle::inference::analysis::TensorRtSubgraphPass::ApplyImpl(paddle::framework::ir::Graph) const
10 paddle::framework::ir::SubGraphFuser::ReplaceNodesWithSubGraphs()
11 paddle::framework::ir::SubgraphDetector::operator()()
12 paddle::framework::ir::SubgraphDetector::MarkNodesInsideSubGraph()
13 paddle::inference::tensorrt::OpTeller::Tell(paddle::framework::ir::Node const*, bool, bool)
14 paddle::inference::tensorrt::SimpleOpTypeSetTeller::operator()(paddle::framework::OpDesc const&, bool, bool)