tsconv2d#

hypercoil.functional.tsconv.tsconv2d(X: Tensor, weight: Tensor, bias: Tensor | None = None, padding: Literal['initial', 'final'] | Sequence[Tuple[int, int]] | None = None, conv_fn: Callable | None = None, **params) Tensor[source]#

Convolve time series data.

This is a convenience function for performing convolution over time series data. It automatically configures padding so that the convolution produces an output with the same number of observations as the input.

Padding can be applied to the initial or final observations of the input dataset, or both.

Dimension:
Input : \((N, *, C, obs)\)

N denotes batch size, * denotes any number of intervening dimensions, C denotes number of data channels or variables, obs denotes number of observations per channel.

Weight : \((C_o, K, *, C\ \mathrm{or}\ 1, R)\)

\(C_o\) denotes number of output channels, K denotes number of input channels (equivalent to the maximum degree of the polynomial), and R < obs denotes the number of observations viewed at once (i.e., in a single convolutional window)

Output : \((N, C_o, *, C, obs)\)

As above.