broadinstitute / keras-rcnn

Keras package for region-based convolutional neural networks (RCNNs)
Other
553 stars 224 forks source link

Move RPN and RCNN losses into keras_rcnn.losses module #162

Open 0x00b1 opened 6 years ago

0x00b1 commented 6 years ago

The RPN and RCNN layers have methods for their respective losses (each has a classification_loss and a regression_loss). We should refactor the methods into functions and move them into the keras_rcnn.losses module to replicate the Keras interface.

In addition, they should, wherever necessary, be refactored to conform to the Keras loss API:

def name(y_true, y_pred):
  return …

and expose the useful Keras alias interface:

model.compile("RCNN", None)