<code>NotImplementedError Traceback (most recent call last)
<ipython-input-36-138183a2a830> in <cell line: 2>()
1 # Create model object in inference mode.
----> 2 model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)
3
4 # Load weights trained on MS-COCO
5 model.load_weights(COCO_MODEL_PATH, by_name=True)
4 frames
/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/lambda_layer.py in compute_output_shape(self, input_shape)
93 return nest.map_structure(lambda x: x.shape, output_spec)
94 except:
---> 95 raise NotImplementedError(
96 "We could not automatically infer the shape of "
97 "the Lambda's output. Please specify the `output_shape` "
NotImplementedError: Exception encountered when calling Lambda.call().
We could not automatically infer the shape of the Lambda's output. Please specify the `output_shape` argument for this Lambda layer.
Arguments received by Lambda.call():
• args=('<KerasTensor shape=(None, 1000, 1, 1, 1024), dtype=float32, sparse=False, name=keras_tensor_9478>',)
• kwargs={'mask': 'None'}
</code>
<code>NotImplementedError Traceback (most recent call last)
<ipython-input-36-138183a2a830> in <cell line: 2>()
1 # Create model object in inference mode.
----> 2 model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)
3
4 # Load weights trained on MS-COCO
5 model.load_weights(COCO_MODEL_PATH, by_name=True)
4 frames
/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/lambda_layer.py in compute_output_shape(self, input_shape)
93 return nest.map_structure(lambda x: x.shape, output_spec)
94 except:
---> 95 raise NotImplementedError(
96 "We could not automatically infer the shape of "
97 "the Lambda's output. Please specify the `output_shape` "
NotImplementedError: Exception encountered when calling Lambda.call().
We could not automatically infer the shape of the Lambda's output. Please specify the `output_shape` argument for this Lambda layer.
Arguments received by Lambda.call():
• args=('<KerasTensor shape=(None, 1000, 1, 1, 1024), dtype=float32, sparse=False, name=keras_tensor_9478>',)
• kwargs={'mask': 'None'}
</code>
NotImplementedError Traceback (most recent call last)
<ipython-input-36-138183a2a830> in <cell line: 2>()
1 # Create model object in inference mode.
----> 2 model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)
3
4 # Load weights trained on MS-COCO
5 model.load_weights(COCO_MODEL_PATH, by_name=True)
4 frames
/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/lambda_layer.py in compute_output_shape(self, input_shape)
93 return nest.map_structure(lambda x: x.shape, output_spec)
94 except:
---> 95 raise NotImplementedError(
96 "We could not automatically infer the shape of "
97 "the Lambda's output. Please specify the `output_shape` "
NotImplementedError: Exception encountered when calling Lambda.call().
We could not automatically infer the shape of the Lambda's output. Please specify the `output_shape` argument for this Lambda layer.
Arguments received by Lambda.call():
• args=('<KerasTensor shape=(None, 1000, 1, 1, 1024), dtype=float32, sparse=False, name=keras_tensor_9478>',)
• kwargs={'mask': 'None'}
how do I solve this problem to run MRCNN in google colab