avg_pool1d_op
Structs
Struct: AvgPool1d
Namespace for 1D average pooling operations.
Fields
Methods
compute_shape(mut curr: ArrayShape, args: List[ArrayShape])
Computes the shape of an array after a 1-dimensional average pooling operation with dilation.
__call__(mut curr: Array, args: List[Array])
vjp(primals: List[Array], grad: Array, out: Array) -> List[Array]
jvp(primals: List[Array], tangents: List[Array]) -> Array
fwd(arg0: Array, kernel_size: Int, stride: Int = 1, padding: Int = 0, dilation: Int = 1) -> Array
more details
Functions
avg_pool1d
avg_pool1d(arg0: Array, kernel_size: Int, stride: Int = 1, padding: Int = 0, dilation: Int = 1) -> Array
Applies a 1D average pooling operation over an input array.
Args
-
arg0
:Array
The input array. -
kernel_size
:Int
The size of the kernel. -
stride
:Int
(default:1
) The stride of the pooling operation. Defaults to 1. -
padding
:Int
(default:0
) The padding to apply to the input. Defaults to 0. -
dilation
:Int
(default:1
) The dilation to apply to the input. Defaults to 1.
Returns
Array
- Array: The output array.
Last updated on