I am trying to train an image segmentation network. I want to make a custom loss that apart from y_true (ground truth mask) and y_pred (predicted mask), it will be based also on the grayscale image (of the current training image/batch). How can I do that? I have not tried any code. Continue reading...