-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We could not automatically infer the shape of the Lambda's output. Please specify the output_shape
argument for this Lambda layer.
#3038
Comments
Same problem here, which appears in the line I am running Traceback (most recent call last): We could not automatically infer the shape of the Lambda's output. Please specify the Arguments received by Lambda.call(): |
is this solved? |
Because i am also getting same errror |
Anyone solved this please tell me i am trying to train it on custom dataset |
Hello I was able to run it in colab. I also encountered the same errors. It was very difficult. https://github.com/z-mahmud22/Mask-RCNN_TF2.14.0 I used the repo here. |
still not solved |
Hello @zlao3118 zlao3188 Which versions do you use? tensorflow==2.5.0 keras==2.3.1 python 3.8.0 Have you tried? |
I was able to solve it with python 3.11 and tensorflow 2.12.0 |
Traceback (most recent call last):
File "D:\Mask_RCNN-2.1\Mask_RCNN-2.1\samples\balloon\balloon.py", line 332, in
model = modellib.MaskRCNN(mode="inference", config=config,
File "D:\Mask_RCNN-2.1\Mask_RCNN-2.1\samples\balloon\model.py", line 1768, in init
self.keras_model = self.build(mode=mode, config=config)
File "D:\Mask_RCNN-2.1\Mask_RCNN-2.1\samples\balloon\model.py", line 1950, in build
fpn_classifier_graph(rpn_rois, mrcnn_feature_maps, config.IMAGE_SHAPE,
File "D:\Mask_RCNN-2.1\Mask_RCNN-2.1\samples\balloon\model.py", line 916, in fpn_classifier_graph
shared = KL.Lambda(lambda x: K.squeeze(K.squeeze(x, 3), 2),
File "D:\python310\lib\site-packages\keras\src\utils\traceback_utils.py", line 122, in error_handler
raise e.with_traceback(filtered_tb) from None
File "D:\python310\lib\site-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, 1000, 1, 1, 1024), dtype=float32, sparse=False, name=keras_tensor_428>',)
• kwargs={'mask': 'None'}
The text was updated successfully, but these errors were encountered: