- torchaudio.functional.convolve(x: Tensor, y: Tensor, mode: str = 'full') Tensor ¶
Convolves inputs along their last dimension using the direct method. Note that, in contrast to
torch.nn.functional.conv1d(), which actually applies the valid cross-correlation operator, this function applies the true convolution operator.
x (torch.Tensor) – First convolution operand, with shape (…, N).
y (torch.Tensor) – Second convolution operand, with shape (…, M) (leading dimensions must be broadcast-able with those of
mode (str, optional) –
Must be one of (“full”, “valid”, “same”).
”full”: Returns the full convolution result, with shape (…, N + M - 1). (Default)
”valid”: Returns the segment of the full convolution result corresponding to where the two inputs overlap completely, with shape (…, max(N, M) - min(N, M) + 1).
”same”: Returns the center segment of the full convolution result, with shape (…, N).
Result of convolving
y, with shape (…, L), where the leading dimensions match those of
xand L is dictated by
- Return type: