训练模型转部署模型指令为:
python tools/export_model.py --config={default_config} --output_dir={deploy_path} --opt weights={weight_path} trt=True exclude_nms=True TestReader.inputs_def.image_shape=[3,640,640]
使用 ~/PaddleDetection/deploy/third_engine/demo_onnx_trt/onnx_custom.py 将 ppyolo-r 模型转为 onnx 模型报错如下:
[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: /mnt/storage/datasets/mml/002_ppyolor_test2/models/deploy/model_cfg/model.pdmodel
[Paddle2ONNX] Paramters file path: /mnt/storage/datasets/mml/002_ppyolor_test2/models/deploy/model_cfg/model.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[ERROR] Due to the unsupported operators, the conversion is aborted.
[Paddle2ONNX] Oops, there are some operators not supported yet, including anchor_generator,
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)