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
ConvShape
struct ConvShape[rank: Int]
A shape struct describing the convolution dimensions.
Fieldsβ
- βn (
Int): - βinput_dims (
IndexList[rank]): - βoutput_dims (
IndexList[rank]): - βfilter_dims (
IndexList[rank]): - βc (
Int): - βf (
Int): - βstride (
IndexList[rank]): - βdilation (
IndexList[rank]): - βpad_d (
IndexList[Int(2)]): - βpad_h (
IndexList[Int(2)]): - βpad_w (
IndexList[Int(2)]): - βnum_groups (
Int):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methodsβ
dβ
hβ
wβ
doβ
hoβ
woβ
qβ
rβ
sβ
filter_window_flat_sizeβ
input_image_flat_sizeβ
output_image_flat_sizeβ
output_space_dimsβ
output_flat_coord_to_input_offsetβ
matmul_Mβ
matmul_Nβ
matmul_Kβ
paddedβ
c_per_groupβ
def c_per_group(self) -> Int
Returns the number of channels per group. Channel count must be divisible by group size.
Returns:
f_per_groupβ
def f_per_group(self) -> Int
Returns the number of filters per group. Filter count must be divisible by group size.
Returns:
f_to_groupβ
def f_to_group(self, f_idx: Int) -> Int
Given a global filter idx, returns the group idx of the group the filter belongs to.
Returns:
c_to_groupβ
def c_to_group(self, c_idx: Int) -> Int
Given a global channel idx, returns the group idx of the group the channel belongs to.
Returns:
f_in_groupβ
def f_in_group(self, f_idx: Int) -> Int
Given a global filter idx, returns the offset of the filter in its group.
Returns:
c_in_groupβ
def c_in_group(self, c_idx: Int) -> Int
Given a global channel idx, returns the offset of the channel in its group.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!