You mean to pad the signal before using torch.nn.functional.conv1d. This would work, thanks. I will still need to remove the padding after filtering as I need the exact indices of each point in the signal. Was too lazy to do it, seems this is the only way for now.