昇腾社区首页
中文
注册

ScopeRpnProposalsPass

功能说明

将generate_rpn_proposals Scope融合为RpnProposals算子。Scope内包括tf.NonMaxSuppressionV2算子、tf.TopKV2算子、4的倍数个tf.Where算子、6的倍数个tf.Gather算子,不包含ExpandDims、Switch和transpose算子。

Scope详情

融合后的算子原型

RpnProposals,具体请参见算子加速库接口参考

融合对应关系

Transpose的输入作为融合后的第一个输入rois。

filtered_boxes、filtered_scores和Gather_1的输入作为融合后的第二个输入cls_bg_prob。

clip_boxes/ReverseV2输入作为融合后的第三个输入img_info。

boxes的输出作为融合后的输出sorted_box。

filtered_boxes的输出作为Where的输入。

transpose和Where的输出作为Gather的输入。

Gather的输出作为Reshape的输入。

filtered_scores的输出作为Where_1的输入。

Where_1的输出作为Gather_1的输入。

Gather_1的输出作为Reshape_1的输入。

Reshape_1的输出作为TopK V2和size的输入。

Size的输出作为Minimum的输入。

Minimum的输出作为TopKV2的输入。

TopKV2的输出作为Gather_2和boolean_mask_1的输入。

Gather_2的输出作为clip_boxes/Maximum的输入。

clip_boxes/ReverseV2的输出作为clip_boxes/Tile的输入。

clip_boxes/Tile的输出作为clip_boxes/ToFloat的输入。

clip_boxes/Maximum和clip_boxes/ToFloat的输出作为clip_boxes/Minimum的输入。

clip_boxes/Minimum的输出作为Reshape_2的输入。

Reshape_2的输出作为boolean_mask和split的输入。

Split的输出作为sub的输入。

Sub的输出作为Squeeze的输入。

Squeeze的输出作为Greater的输入。

Greater的输出作为All的输入。

All的输出作为boolean_mask和boolean_mask_1的输入。

boolean_mask的输出作为Reshape_3和ReverseV2的输入。

ReverseV2的输出作为nms_input_boxes的输入。

nms_input_boxes的输出作为non_max_suppression的输入。

boolean_mask_1的输出作为non_max_suppression的输入。

non_max_suppression和Reshape_3的输出作为Boxes的输入。

适用网络

2D-H1

融合规则类型

定制化融合规则