Skip to main content

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, ImplicitlyDestructible, Movable, RegisterPassable, TrivialRegisterPassable

Methods​

__init__​

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

Constructor of an ImageShape instance from an ImageData.

Args: