IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

resize_nearest_neighbor

def resize_nearest_neighbor[coordinate_transformation_mode: CoordinateTransformationMode, round_mode: RoundMode, dtype: DType](input: TileTensor[dtype, Storage=input.Storage, address_space=input.address_space, linear_idx_type=input.linear_idx_type], output: TileTensor[dtype, Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type], ctx: DeviceContext)

Resizes input to output shape using nearest-neighbor interpolation.

Parameters:

  • ​coordinate_transformation_mode (CoordinateTransformationMode): How to map a coordinate in output to a coordinate in input.
  • ​round_mode (RoundMode): How to round fractional input coordinates to integer indices.
  • ​dtype (DType): Type of input and output.

Args:

Was this page helpful?