Mojo struct
Naive2dConvolution
struct Naive2dConvolution[output_type: DType, input_type: DType, filter_type: DType]
Struct wrapper for naive 2d convolution implementation.
Fields
- output (
UnsafePointer[Scalar[output_type]]): - input (
UnsafePointer[Scalar[input_type]]): - filter (
UnsafePointer[Scalar[filter_type]]): - 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,
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
__init__
__init__(out self, output: UnsafePointer[Scalar[output_type]], input: UnsafePointer[Scalar[input_type]], filter: UnsafePointer[Scalar[filter_type]], 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[Scalar[output_type]], input: UnsafePointer[Scalar[input_type]], filter: UnsafePointer[Scalar[filter_type]], 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!