title: Training MaskRCNN on custom data issue
body: <p>I am trying to train Mask RCNN on a custom dataset of floorplans. I am following this article on Medium to do this: <a href="https://medium.com/analytics-vidhya/a-simple-guide-to-maskrcnn-custom-dataset-implementation-27f7eab381f2" rel="nofollow noreferrer">https://medium.com/analytics-vidhya/a-simple-guide-to-maskrcnn-custom-dataset-implementation-27f7eab381f2</a> .</p>
  <p>After having some issues with annotation formats and packages I got around to training the model. However, I stumbled upon the following error code:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;custom.py&quot;, line 391, in &lt;module&gt;
      train(model)
    File &quot;custom.py&quot;, line 222, in train
      layers='heads')
    File &quot;C:...\Custom_MaskRCNN-master\mrcnn\model.py&quot;, line 2356, in train
      self.compile(learning_rate, self.config.LEARNING_MOMENTUM)
    File &quot;C:...\Custom_MaskRCNN-master\mrcnn\model.py&quot;, line 2201, in compile
      self.keras_model.add_metric(loss, name)
  AttributeError: 'Model' object has no attribute 'add_metric'
  </code></pre>
  <p>I could not find anything about this error and was hoping someone could help out or give me an indication on how to fix this.</p>