Skip to content

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

@Ishan-10038

Description

@Ishan-10038

Dear Author,
When I am running this part of the code inside Google Colab,

Creating model in Inference mode
import tensorflow as tf
with tf.device(DEVICE):
model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config)

Loading the last best model which is trained
weights_path = model.find_last()[1]
custom_WEIGHTS_PATH = '/content/drive/MyDrive/car-damage-detection-using-CNN/logs/mask_rcnn_coco.h5'

Load weights
print("Loading weights ", custom_WEIGHTS_PATH)
model.load_weights(custom_WEIGHTS_PATH, by_name=True)

I get the following error:
ValueError: None values not supported.

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
ValueError: None values not supported.

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/op_def_library.py in _apply_op_helper(op_type_name, name, **keywords)
538 raise ValueError(
539 "Tried to convert '%s' to a tensor and failed. Error: %s" %
--> 540 (input_name, err))
541 prefix = ("Input '%s' of '%s' Op has type %s that does not match" %
542 (input_name, op_type_name, observed))

ValueError: Tried to convert 'shape' to a tensor and failed. Error: None values not supported. Kindly assist me on the same

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions