For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
roi_align_nhwc
def roi_align_nhwc[dtype: DType, //, aligned: Bool, mode: StringSlice[ImmStaticOrigin] = StringSlice("AVG")](output: TileTensor[dtype, Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type], input: TileTensor[dtype, Storage=input.Storage, address_space=input.address_space, linear_idx_type=input.linear_idx_type], rois: TileTensor[dtype, Storage=rois.Storage, address_space=rois.address_space, linear_idx_type=rois.linear_idx_type], output_height: Int, output_width: Int, in_spatial_scale: Scalar, in_sampling_ratio: Scalar)
Compute ROIAlign a batch of rois of shape [M, 5] where the first dim is the batch index, followed by region box coordinates (x0, y0) (x1, y1). For inputs of NHWC format. The output shape is [M, output_height, output_width, C].
Parameters:
- โdtype (
DType): Type of the input tensor. - โaligned (
Bool): If not true offset the ROIs by 0.5. - โmode (
StringSlice[ImmStaticOrigin]): The pooling mode "AVG" for average and "MAX" for max pooling.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!