首页 Paddle框架 帖子详情
导出模型export_model - CascadeCA RCNN OIDV5的模型错误
收藏
快速回复
Paddle框架 问答模型训练 519 3
导出模型export_model - CascadeCA RCNN OIDV5的模型错误
收藏
快速回复
Paddle框架 问答模型训练 519 3

当expert_model 模型 CascadeCA RCNN时,执行下面命令:

export_model.py -c configs/oidv5/cascade_rcnn_cls_aware_r200_vd_fpn_dcnv2_nonlocal_softnms.yml --output_dir=./inference_model -o weights='./oidv5_cascade_rcnn_cls_aware_r200_vd_fpn_dcnv2_nonlocal_softnms/'

报告下面错误:

Exception: The program contains py_func with input: ['box_clip_0.tmp_0', 'tmp_9'], output: ['softnms_pred_result']. It is not supported in Paddle inference engine. please replace it by paddle ops. For example, if you use MultiClassSoftNMS, better to replace it by MultiClassNMS.

0
收藏
回复
全部评论(3)
时间顺序
李长安
#2 回复于2021-11

算子不支持,自己重写一下算子吧。

0
回复
FrankLiu89
#3 回复于2021-11

谢谢回复: 
在:PaddleDetection/static/ppdet/modeling/ops.py文件里已定义注册自己的算子:

class MultiClassSoftNMS(object):

fluid.layers.py_func(func=_batch_softnms, x=[bboxes, scores], out=pred_result)

但在执行static/tools/export_model.py 导出模型为什么还报上面错误(调用check_py_func)?

请大神指教!

0
回复
FrankLiu89
#4 回复于2021-11

MultiClassSoftNMS 采用Python实现,不支持模型导出。如果要部署的化,可以考虑换成MultiClassNMS,看下对精度的影响,然后导出模型。

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户