ScopeROIAlignPass

Description

Fuses tf.AvgPool and tf.image.CropAndResize into an ROIAlign operator, excluding the Merge operator.

Scope Details

Result Operator Prototype

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

Fusion Mapping

The input of crop_and_resize/Shape/Switch is used as the first input features of the fused operator.

The input of Shape is used as the second input rois of the fused operator.

The output of AvgPool is used as the output y of the fused operator.

The output of Shape is used as the input of StridedSlice.

The output of StridedSlice is used as the input of zeros.

The output of crop_and_resize/Shape/Switch is used as the input of crop_and_resize/Shape/Shape and crop_and_resize/transpose.

The output of crop_and_resize/Shape/Shape is used as the input of crop_and_resize/strided_slice.

The output of crop_and_resize/strided_slice is used as the input of crop_and_resize/transform_fpcoor_for_tf.

The outputs of crop_and_resize/transform_fpcoor_for_tf and crop_and_resize/transpose are used as the input of CropAndResize.

The output of crop_and_resize or CropAndResize is used as the input of crop_and_resize/transpose_1.

The output of crop_and_resize/transpose_1 is used as the input of AvgPool.

Applicable Network

2D-H1

Fusion Pattern Type

Non-general fusion pattern