Mojo struct
ConvShape
@register_passable(trivial)
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,
Movable,
UnknownDestructibility
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = True
__del__is_trivial
alias __del__is_trivial = True
__moveinit__is_trivial
alias __moveinit__is_trivial = True
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!