For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /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.