I am trying to implement into my Keras model a conv2D layer that uses a specific Gaussian filter. I have code that makes the filter, although the existing Keras Conv2D does not have a parameter for the filter itself. Instead, there is a filters
parameter, which is an integer that specifies the dimensionality of the output space, and the kernel_size
, which is a tuple that specifies the dimensions of the kernel.
I have tried to use the Keras backend stuff to solve this problem, as the conv2D function here allows you to input a specific filter as I would like to do. The problem is that I do not know how to get this back into my model, so again, I am stuck. I have also found questions similar to mine like this one which suggests writing my own layer, but I am not really sure how I would go about doing that, and would hope to avoid it if there is an easier way.
As always, any help is much appreciated.