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 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,
Deinitable,
ImplicitlyCopyable,
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.
Parameters:
- dtype (
DType): The element type of the image data (inferred). - image_layout (
Image2DLayout): The compile-time data layout tag of the image data, orImage2DLayout.UNKNOWNwhen only known at runtime.
Args:
- image_data (
ImageData[dtype, image_layout]): The image data instance to extract shape info from.