ngraph.roi_align¶
- ngraph.roi_align(data: Union[_pyngraph.Node, int, float, numpy.ndarray], rois: Union[_pyngraph.Node, int, float, numpy.ndarray], batch_indices: Union[_pyngraph.Node, int, float, numpy.ndarray], pooled_h: int, pooled_w: int, sampling_ratio: int, spatial_scale: float, mode: str, aligned_mode: Optional[str] = 'asymmetric', name: Optional[str] = None) _pyngraph.Node ¶
Return a node which performs ROIAlign operation.
- Parameters
data – Input data.
rois – RoIs (Regions of Interest) to pool over.
batch_indices – Tensor with each element denoting the index of the corresponding image in the batch.
pooled_h – Height of the ROI output feature map.
pooled_w – Width of the ROI output feature map.
sampling_ratio – Number of bins over height and width to use to calculate each output feature map element.
spatial_scale – Multiplicative spatial scale factor to translate ROI coordinates.
mode – Method to perform pooling to produce output feature map elements. Avaiable modes are: - ‘max’ - maximum pooling - ‘avg’ - average pooling
aligned_mode – Specifies how to transform the coordinate in original tensor to the resized tensor. Mode ‘asymmetric’ is the default value. Optional. Avaiable aligned modes are: - ‘asymmetric’ - ‘half_pixel_for_nn’ - ‘half_pixel’
name – The optional name for the output node
- Returns
The new node which performs ROIAlign