I would like to implement a pixelwise segmentation like in
https://arxiv.org/abs/1505.04597. To enforce the learning of small boundaries the authors of the paper use a pixelwise weight-map (2D) which is multiplied to the error in the loss-function. So instead of X, y (input, label) each training-sample contains of a X, y, w (input, label, weight).
I have designed a custom cross-entropy function which can deal with the weights but unforunately I have no idea how I can bring the weights into the loss-function. Static weight-maps are solved in
https://github.com/fchollet/keras/issues/2115 but this does not apply to sample-wise weights.