1D Gaussian Kernel

You could create a gaussian kernel as described e.g. in this post or this one and apply it to your input via F.conv2d.