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_linear

def resize_linear[coordinate_transformation_mode: CoordinateTransformationMode, antialias: Bool, dtype: DType](input: TileTensor[dtype, linear_idx_type=input.linear_idx_type, element_size=input.element_size], output: TileTensor[dtype, linear_idx_type=output.linear_idx_type, element_size=output.element_size])

Resizes input to output shape using linear interpolation.

Does not use anti-aliasing filter for downsampling (coming soon).

Parameters:

  • ​coordinate_transformation_mode (CoordinateTransformationMode): How to map a coordinate in output to a coordinate in input.
  • ​antialias (Bool): Whether or not to use an antialiasing linear/cubic filter, which when downsampling, uses more points to avoid aliasing artifacts. Effectively stretches the filter by a factor of 1 / scale.
  • ​dtype (DType): Type of input and output.

Args: