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:
- βinput (
TileTensor[dtype, Storage=input.Storage, address_space=input.address_space, linear_idx_type=input.linear_idx_type]): The input to be resized. - βoutput (
TileTensor[dtype, Storage=output.Storage, address_space=output.address_space, linear_idx_type=output.linear_idx_type]): The output containing the resized input. - βctx (
DeviceContext): The device context used to launch the kernel.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!