Design a gassian convolutional layer

Hi,
I am new to PyTorch. I want to add a gaussian convolutional layer to my autoencoder, where the mean and covariance matrix can be trained. How can I implement this in pytorch?