copapy.nn.conv1d#
- copapy.nn.conv1d(x, weight, bias=None, stride=1, padding=0, dilation=1)#
1D convolution (cross-correlation as in most deep learning frameworks) computed by a single array stencil.
- Parameters:
x (
TArr) – Input of shape (channels, length) or (batch, channels, length).weight (
array[Any] |ArrayType[Any] |Sequence[Any]) – Kernels of shape (out_channels, channels, kernel_length).bias (
array[Any] |ArrayType[Any] |Sequence[Any] |None) – Optional bias of shape (out_channels,).stride (
int) – Step of the kernel.padding (
int) – Zero padding on both sides of the input.dilation (
int) – Spacing between the kernel elements.
- Return type:
TArr- Returns:
Float array or tensor (same type as x) of shape (out_channels, out_length) with a leading batch dimension if x has one.