I had originally implemented it by dividing the output by the norm of the convolution weights. However, this caused some NaN issues since torch.norm() may return a almost-zero value.
I’ve implemented a new method with your suggestion, and it seems to be working well now. Thanks!