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 struct

ImageShape

struct ImageShape

A data-layout agnostic representation of tensor shapes used in conv2d.

Fields​

  • ​N (Int):
  • ​C (Int):
  • ​H (Int):
  • ​W (Int):

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TrivialRegisterPassable

Methods​

__init__​

def __init__[dtype: DType, image_layout: Image2DLayout](image_data: ImageData[dtype, image_layout]) -> Self

Constructor of an ImageShape instance from an ImageData.

Args: