Skip to content

ValueError: Exception encountered when calling layer "mrcnn_bbox" (type Reshape). #3047

@liaokaiyao

Description

@liaokaiyao

Error creating MaskRCNN model: Exception encountered when calling layer "mrcnn_bbox" (type Reshape).

Tried to convert 'shape' to a tensor and failed. Error: None values not supported.

Call arguments received by layer "mrcnn_bbox" (type Reshape):
• inputs=tf.Tensor(shape=(1, None, 324), dtype=float32)
Traceback (most recent call last):
File "test.py", line 67, in
model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)
File "/home/chenx2/liao/mrcnn/mrcnn/model.py", line 1839, in init
self.keras_model = self.build(mode=mode, config=config)
File "/home/chenx2/liao/mrcnn/mrcnn/model.py", line 2037, in build
fpn_classifier_graph(rpn_rois, mrcnn_feature_maps, input_image_meta,
File "/home/chenx2/liao/mrcnn/mrcnn/model.py", line 953, in fpn_classifier_graph
mrcnn_bbox = KL.Reshape((s[1], num_classes, 4), name="mrcnn_bbox")(x)
File "/home/chenx2/miniconda3/envs/igibson1/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/chenx2/miniconda3/envs/igibson1/lib/python3.8/site-packages/tensorflow/python/framework/op_def_library.py", line 571, in _ExtractInputsAndAttrs
raise ValueError(
ValueError: Exception encountered when calling layer "mrcnn_bbox" (type Reshape).

Tried to convert 'shape' to a tensor and failed. Error: None values not supported.

Call arguments received by layer "mrcnn_bbox" (type Reshape):
• inputs=tf.Tensor(shape=(1, None, 324), dtype=float32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions