Mojo struct
Naive2dConvolution
struct Naive2dConvolution[output_type: DType, input_type: DType, filter_type: DType]
Struct wrapper for naive 2d convolution implementation.
Fields
- output (
UnsafePointer[SIMD[output_type, 1]]
): - input (
UnsafePointer[SIMD[input_type, 1]]
): - filter (
UnsafePointer[SIMD[filter_type, 1]]
): - pad_d (
IndexList[2]
): - pad_h (
IndexList[2]
): - pad_w (
IndexList[2]
): - stride (
IndexList[3]
): - dilation (
IndexList[3]
): - num_groups (
Int
): - output_shape (
IndexList[5]
): - input_shape (
IndexList[5]
): - filter_shape (
IndexList[5]
):
Implemented traits
AnyType
,
Copyable
,
ExplicitlyCopyable
,
Movable
,
UnknownDestructibility
Methods
__init__
__init__(out self, output: UnsafePointer[SIMD[output_type, 1]], input: UnsafePointer[SIMD[input_type, 1]], filter: UnsafePointer[SIMD[filter_type, 1]], output_shape: IndexList[5], input_shape: IndexList[5], filter_shape: IndexList[5], pad_d: IndexList[2], pad_h: IndexList[2], pad_w: IndexList[2], stride: IndexList[3], dilation: IndexList[3], num_groups: Int)
run
static run(output: UnsafePointer[SIMD[output_type, 1]], input: UnsafePointer[SIMD[input_type, 1]], filter: UnsafePointer[SIMD[filter_type, 1]], output_shape: IndexList[5], input_shape: IndexList[5], filter_shape: IndexList[5], pad_d: IndexList[2], pad_h: IndexList[2], pad_w: IndexList[2], stride: IndexList[3], dilation: IndexList[3], num_groups: Int)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!