Generate your filter with https://docs.scipy.org/doc/scipy-0.16.1/reference/generated/scipy.ndimage.filters.gaussian_filter.html 316
copy over into m.weight.data
m.weight.data is of shape: nOutputChannels x nInputChannels x kernelHeight x kernelWidth, so you have to generate nOutputChannels * nInputChannels, then make a numpy array of the same shape as m.weight.data and then copy:
generated_filters = ... # some scipy / numpy logic
m.weight.data.copy_(torch.from_numpy(generated_filters))