title: I am trying to build a object detection using Mask RCNN and get an error when i call MaskRCNN method
body: <p>I am trying to use matterport's keras implementation of Mask RCNN. When I call the function modellib.MaskRCNN, I get below error.</p>
  <p>'''maskrcnnModel = modellib.MaskRCNN(mode='training', config=config, model_dir='/rootdir' )'''</p>
  <p>/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/type_spec.py in type_spec_from_value(value)
  3, &quot;Failed to convert %r to tensor: %s&quot; % (type(value).<strong>name</strong>, e))</p>
  <p>raise TypeError(&quot;Could not build a TypeSpec for %r with type %s&quot; %
  (value, type(value).name))
  TypeError: Could not build a TypeSpec for &lt;KerasTensor: shape=(None, None, 4) dtype=float32 (created by layer 'tf.math.truediv')&gt; with type KerasTensor</p>
  <p>I am using Tensorflow 2.4.1 and keras 2.4.0 version</p>
  <p>I surfed at many places, but i did not work for me. I tried to modify the model.py as recommended in other stackoverflow questions, but i do not see any difference.</p>
  <p>I appreciate your help</p>