I have a seemingly simple problem. I wish to implement a loss function that contains a fixed convolution. That is if X is my input image and Y = f(X) is the output of my CNN, I wish to minimize ||A*Y||. where A is a fixed convolution operation (say a derivative filter). What is the easiest way to implement this?