title: keras FRCNN training error message: Exception: 'a' cannot be empty unless no samples are taken
body: <p>I am using this implementation of FRCNN for training on my dataset:</p>
  
  <p><a href="https://github.com/kbardool/keras-frcnn" rel="nofollow noreferrer">https://github.com/kbardool/keras-frcnn</a></p>
  
  <p>during training I get random exceptions with no stack trace:</p>
  
  <pre><code>708/1000 [====================&gt;.........] - ETA: 289s - rpn_cls: 0.1376 - rpn_regr: 0.3020 - detector_cls: 
  709/1000 [====================&gt;.........] - ETA: 288s - rpn_cls: 0.1376 - rpn_regr: 0.3020 - detector_cls: 
  710/1000 [====================&gt;.........] - ETA: 287s - rpn_cls: 0.1374 - rpn_regr: 0.3021 - detector_cls: 
  711/1000 [====================&gt;.........] - ETA: 286s - rpn_cls: 0.1373 - rpn_regr: 0.3018 - detector_cls: 
  712/1000 [====================&gt;.........] - ETA: 284s - rpn_cls: 0.1371 - rpn_regr: 0.3017 - detector_cls: 
  713/1000 [====================&gt;.........] - ETA: 283s - rpn_cls: 0.1370 - rpn_regr: 0.3019 - detector_cls: 
  714/1000 [====================&gt;.........] - ETA: 282s - rpn_cls: 0.1370 - rpn_regr: 0.3017 - detector_cls: 0.0783 - detector_regr: 0.0686
  Exception: 'a' cannot be empty unless no samples are taken
  
  715/1000 [====================&gt;.........] - ETA: 281s - rpn_cls: 0.1369 - rpn_regr: 0.3015 - detector_cls: 
  716/1000 [====================&gt;.........] - ETA: 280s - rpn_cls: 0.1367 - rpn_regr: 0.3013 - detector_cls: 
  717/1000 [====================&gt;.........] - ETA: 279s - rpn_cls: 0.1365 - rpn_regr: 0.3009 - detector_cls: 
  718/1000 [====================&gt;.........] - ETA: 278s - rpn_cls: 0.1363 - rpn_regr: 0.3011 - detector_cls:
  </code></pre>
  
  <p>while I get error message, loss still goes down, what can be the reason and how can I fix it?</p>