Perform 1D convolution between an input signal and a kernel with zero padding and centered kernel.
Let . Out-of-bounds accesses to are treated as zero.
The convolution operation slides the kernel over the input signal, computing the sum of element-wise multiplications at each position. Zero padding is used at the boundaries.
torch.nn.functional.conv1d(..., padding=K//2) (cross-correlation, kernel is not flipped)Sample Run Results
Hit "Run" to test your code with sample inputs
Loading editor...
CUDA C++ environment
For the best coding experience, please switch to a desktop device to write and submit your solution.