Skip to content
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

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

Open
Ishan-10038 opened this issue Jul 19, 2021 · 0 comments

Comments

@Ishan-10038
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant