You could check the torch.nn.init functions and see if one of them would fit your use case.
Alternatively, copying your kernel into the weight parameters would also work, but I needed to remove it for debugging as the code was not executable with these undefined variables.