No problem, glad you found it useful!
The actual weights are registered as a buffer
self.register_buffer('weight', kernel)

Since they are not parameters (torch.nn.Parameter) they are not trained and will remain static when you use the layer.
class MyModel(torch.nn.Module):
    def __init__(self):
        super(MyModel, self).__init__()
        self.layer = torch.nn.Conv2d(5, 5, kernel_size=3, padding=1)
        self.smoothing = GaussianSmoothing(5, kernel_size=3, sigma=1)

    def forward(self, x):
        x = self.layer(x)
        x = torch.nn.functional.pad(x, (1, 1, 1, 1), mode='reflect')
        x = self.smoothing(x)
        return x

my_model = MyModel()
opt = torch.nn.optim.SGD(my_model.parameters(), lr=1e-3)
output = my_model(torch.randn(1, 5, 10, 10))
loss = output.mean()
opt.zero_grad()
loss.backward()
opt.step()

The smoothing layer will remain static during training