a = RCNNMaskLoss.binary_crossentropy(target=target_mask, output=output_mask)
// loss = keras.backend.sum(a * b) / keras.backend.sum(b)
loss = keras.backend.mean(a * b)
// TODO: we should try:
// `keras.backend.mean(a * b) + keras.backend.mean(1 - b)`
After Change
a = RCNNMaskLoss.binary_crossentropy(target=target_mask, output=output_mask)
loss = keras.backend.sum(a * b) / keras.backend.sum(b)
// loss = keras.backend.mean(a * b)
// TODO: we should try:
// `keras.backend.mean(a * b) + keras.backend.mean(1 - b)`