Create new convolution filter

Hi,
I want to implement a new convolution filter, the Edge-to-Edge Filter represented in this article : https://kawahara.ca/convolutional-neural-networks-for-adjacency-matrices/.
But I have no idea how to do this, that I will able to use it as a layer in my model like I would use the Conv2d.

I would love guidance on how to do this.

Thank you in advance !