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: None values not supported. #1

Open
1044197988 opened this issue Aug 27, 2019 · 2 comments
Open

ValueError: None values not supported. #1

1044197988 opened this issue Aug 27, 2019 · 2 comments

Comments

@1044197988
Copy link

Traceback (most recent call last):
File "<pyshell#5>", line 1, in
model = mask_rcnn.MaskRCNN(mode="inference", config=configs, model_dir=os.getcwd())
File "C:\Users\Admin\Desktop\666\Project\mask_rcnn\model.py", line 1907, in init
self.keras_model = self.build(mode=mode, config=config)
File "C:\Users\Admin\Desktop\666\Project\mask_rcnn\model.py", line 2114, in build
[rpn_rois, mrcnn_class, mrcnn_bbox, input_image_meta])
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 662, in call
outputs = call_fn(inputs, *args, **kwargs)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\autograph\impl\api.py", line 169, in wrapper
raise e.ag_error_metadata.to_exception(type(e))
ValueError: in converted code:
relative to C:\Users\Admin:

Desktop\666\Project\mask_rcnn\model.py:880 call  *
    detections_batch = utils.batch_slice(
Desktop\666\Project\mask_rcnn\utils.py:835 batch_slice  *
    output_slice = graph_fn(*inputs_slice)
AppData\Local\Temp\tmphkl59he4.py:15 None  *
    detections_batch = ag__.converted_call('batch_slice', utils, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), ([rois, mrcnn_class, mrcnn_bbox, window], lambda x, y, w, z: ag__.converted_call(refine_detections_graph, None, ag__.ConversionOptions(recursive=True, force_conversion=False, optional_features=(), internal_convert_user_code=True), (x, y, w, z, self.config), None), self.config.IMAGES_PER_GPU), None)
Desktop\666\Project\mask_rcnn\model.py:772 refine_detections_graph  *
    indices = tf.stack([tf.range(probs.shape[0]), class_ids], axis=1)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\ops\math_ops.py:1305 range
    limit = ops.convert_to_tensor(limit, dtype=dtype, name="limit")
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py:1100 convert_to_tensor
    return convert_to_tensor_v2(value, dtype, preferred_dtype, name)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py:1158 convert_to_tensor_v2
    as_ref=False)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\ops.py:1237 internal_convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\constant_op.py:305 _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\constant_op.py:246 constant
    allow_broadcast=True)
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\constant_op.py:284 _constant_impl
    allow_broadcast=allow_broadcast))
AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\tensor_util.py:455 make_tensor_proto
    raise ValueError("None values not supported.")

ValueError: None values not supported.

你好,感谢您的代码
我在运行代码maskrcnn时候报错了
我的环境 win10
tensorflow-gpu-beta1
代码:
model = mask_rcnn.MaskRCNN(mode="inference", config=configs,model_dir=os.getcwd())
就报错了
因为这是一个巨大的项目,代码量很大,我很难检查出来

@Vishal-V
Copy link
Owner

Hi,
I am currently working on fixing this issue.
This is actually adapted from a Mask R-CNN implementation that was built for TF 1.8. Since TF 2.0 is eager by default, the batch utils cannot slice an eager tensor that has None in the shape and hence this error.

Thank you for checking it out. Will provide an update soon.

@1044197988
Copy link
Author

Thank you and look forward to your next update
I'm going to learn about this model

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

2 participants