-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support the 'generate_proposals' for generating static graph ops #52940
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
infer_meta : | ||
func : GenerateProposalsV2InferMeta | ||
kernel : | ||
func : generate_proposals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加data_type : anchors
- op : generate_proposals | ||
args : (Tensor scores, Tensor bbox_deltas, Tensor im_shape, Tensor anchors, Tensor variances, int pre_nms_top_n, int post_nms_top_n, float nms_thresh, float min_size, float eta, bool pixel_offset=true) | ||
output : Tensor(rpn_rois), Tensor(rpn_roi_probs), Tensor(rpn_rois_num) | ||
infer_meta : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加optional : rpn_rois_num
func : GenerateProposalsV2InferMeta | ||
kernel : | ||
func : generate_proposals | ||
optional : rpn_rois_num |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考其他ops的optional
data_type
配置设置一下,这里的参数格式不对
fix bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
全局搜索generate_proposals_v2_op.cc
,应该会在paddle/fluid/operators/detection/CMakeLists.txt
找到依赖这个文件的代码,请删除相关代码。
inputs : | ||
{scores : Scores, bbox_deltas : BboxDeltas, im_shape : ImShape, anchors : Anchors, variances : Variances} | ||
outputs : | ||
{rpn_rois : RpnRois, rpn_roi_probs : RpnRoiProbs, rpn_rois_num : RpnRoisNum} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以通过ci-py3
的错误信息同时结合xxx_op.cc文件,这里有部分attrs的name名字也需要映射。仔细对比xxx_op.cc
文件和yaml中的名字进行修改,如"pre_nms_top_n",请全面对比名字。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的👌
paddle/phi/api/yaml/op_compat.yaml
Outdated
@@ -952,6 +952,12 @@ | |||
extra : | |||
attrs : [bool use_mkldnn = false, str mkldnn_data_type = "float32"] | |||
|
|||
- op : generate_proposals(generate_proposals_v2) | |||
inputs : | |||
{scores : Scores, bbox_deltas : BboxDeltas, im_shape : ImShape, anchors : Anchors, variances : Variances, pre_nms_top_n : pre_nms_topN, post_nms_top_n : post_nms_topN} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputs
里只会有tensor
类型的参数,其余类型的要配置到attrs
中,可以参考其他算子的配置。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原来是这样,之前就好奇 inputs
和 attrs
有什么区别,看到有的用inputs
,有的用 attrs
,还以为这两个都可以
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…dlePaddle#52940) * support the 'generate_proposals' for generating static graph ops * fix bug * fix bug * Update ops.yaml fix bug * remove the generate_proposals_v2_op.cc from CMakeLists.txt * fix bug * fix bug
PR types
Others
PR changes
Others
Description
add autogen code support for generate_proposals
#51842