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[2]): - βpad_h (
IndexList[2]): - βpad_w (
IndexList[2]): - βnum_groups (
Int):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
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β
c_per_group(self) -> Int
Returns the number of channels per group. Channel count must be divisible by group size.
Returns:
f_per_groupβ
f_per_group(self) -> Int
Returns the number of filters per group. Filter count must be divisible by group size.
Returns:
f_to_groupβ
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β
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β
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β
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!