AarohiSingla / Mask-R-CNN-on-Custom-Dataset

27 stars 20 forks source link

lambda call issue #8

Open Micky-12 opened 3 months ago

Micky-12 commented 3 months ago

Traceback (most recent call last): File "/content/MaskRCNN/custom.py", line 187, in model = modellib.MaskRCNN(mode="training", config=config, File "/content/MaskRCNN/mrcnn/model.py", line 1835, in init self.keras_model = self.build(mode=mode, config=config) File "/content/MaskRCNN/mrcnn/model.py", line 1873, in build gt_boxes = KL.Lambda(lambda x: norm_boxes_graph( File "/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler raise e.with_traceback(filtered_tb) from None File "/usr/local/lib/python3.10/dist-packages/keras/src/layers/core/lambda_layer.py", line 95, in compute_output_shape raise NotImplementedError( 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, None, 4), dtype=float32, sparse=None, name=input_gt_boxes>',) • kwargs={'mask': 'None'}

sakethreddy26 commented 1 month ago

just check the required versions of all modules