Custom pooling/conv layer

Custom convolution layer can be implemented either by inheritance from the class nn.Conv2d, or through the funciton unfold. Unfortunately, unfold do not support dilation.

You may want to check these two topics:

Custom pooling can be implemented like this:

3 Likes