Is there a way to do padding in the way of direct reflection when doing convolution?

In convolution, the most common way to do padding is to add 0, but I wonder is there any way to pad an input image using reflection way, reflecting some pixels in the edge region to keep the shape of input image unchanged after convolution ?
Any advice would be appreciated !

Have a look at Padding Layers, e.g. ReflectionPad2d.