bartorch.conv#
- bartorch.conv()#
Cyclic convolution of
inputwithkernelalongaxes, of the input’s shape.Kernel index
(k - 1) // 2sits at zero shift, so an odd kernel is centred and an even one leans to the start:out[i] = sum_j kernel[j] * input[(i - j + (k - 1) // 2) % n].- Parameters:
input (torch.Tensor) – Array to convolve.
kernel (torch.Tensor) – Aligned with
inputfrom the last axis: any size alongaxes, and one (shared) or the input’s size elsewhere.axes (int or tuple of int) – Axes to convolve along.
- Returns:
The shape of
input.- Return type:
torch.Tensor