Define a custom layer with 2 tensors inputs in Keras
Since you don't need it to be trainable, a lambda function will also do. Or you can keep the custom layer as you have it, and set trainable to False. The weights will never be updated for this layer, and whatever you do here will forward propagate to the next layer in the model and as mentioned in the comments, backprop will impact the other layers with weights. So, definitely your model will learn something.
I personally recommend using a custom layer, if you decide later to add some learning to this layer and check your results. You cannot do this in a Lambda function. If you add one (kernel), you will have to use in the 'call' method. Your model will throw an error during training otherwise.
I would like to implement a custom layer. The 2 inputs of my custom layer are 2 tensors, which come from 2 seperate 2D convolution layers, is there an example?