Is there any way to implement a loss function that is shared between outputs? I have a 2D image output and scalar classification that are both used by a single loss function.
I have attempted writing a function that returns a function, as in this comment, but I would need the input to the function to be the current training example. I also thought of using a merge layer, but that wouldn't work due to an incompatibility of the layer dimensions.
Does anyone know of a way to write such a loss function in keras?