I'm trying to write the custom loss function called ( Auxiliary loss function) which are two softmax loss functions put together that controls both the Context path and Spatial path of the network.
The loss function is for both paths . I don't know if I include two softmax layers at the end of both paths or not.
Or I create a custom loss function that takes the output of the last layers of both paths before mergeing the features.
One other thing is that created the network with keras with two inputs(for both separate paths) and one output.
Here is a link to my jupyter notebook.