ScopeRpnProposalsPass

Description

Fuses generate_rpn_proposals Scope into an RpnProposals operator. The scope includes: tf.NonMaxSuppressionV2 operators, tf.TopKV2 operators, a multiple of four tf.Where operators, and a multiple of six tf.Gather operators. The ExpandDims, Switch, and transpose operators are not included.

Scope Details

Result Operator Prototype

RpnProposals. For details, see Operator Acceleration Library API Reference.

Fusion Mapping

The input of transpose is used as the first input rois of the fused operator.

The inputs of filtered_boxes, filtered_scores, and Gather_1 are used as the second input cls_bg_prob of the fused operator.

The input of clip_boxes/ReverseV2 is used as the third input img_info of the fused operator.

The output of boxes is used as the output of sorted_box of the fused operator.

The output of filtered_boxes is used as the input of Where.

The outputs of transpose and Where are used as the input of Gather.

The output of Gather is used as the input of Reshape.

The output of filtered_scores is used as the input of Where_1.

The output of Where_1 is used as the input of Gather_1.

The output of Gather_1 is used as the input of Reshape_1.

The output of Reshape_1 is used as the input of TopK V2 and Size.

The output of Size is used as the input of Minimum.

The output of Minimum is used as the input of TopKV2.

The output of TopKV2 is used as the input of Gather_2 and boolean_mask_1.

The output of Gather_2 is used as the input of clip_boxes/Maximum.

The output of clip_boxes/ReverseV2 is used as the input of clip_boxes/Tile.

The output of clip_boxes/Tile is used as the input of clip_boxes/ToFloat.

The outputs of clip_boxes/Maximum and clip_boxes/ToFloat are used as the input of clip_boxes/Minimum.

The output of clip_boxes/Minimum is used as the input of Reshape_2.

The output of Reshape_2 is used as the input of boolean_mask and split.

The output of Split is used as the input of Sub.

The output of Sub is used as the input of Squeeze.

The output of Squeeze is used as the input of Greater.

The output of Greater is used as the input of All.

The output of All is used as the input of boolean_mask and boolean_mask_1.

The output of boolean_mask is used as the inputs of Reshape_3 and ReverseV2.

The output of ReverseV2 is used as the input of nms_input_boxes.

The output of nms_input_boxes is used as the input of non_max_suppression.

The output of boolean_mask_1 is used as the input of non_max_suppression.

The outputs of non_max_suppression and Reshape_3 are used as the input of Boxes.

Applicable Network

2D-H1

Fusion Pattern Type

Non-general fusion pattern