lmb-freiburg / hand3d

Network estimating 3D Handpose from single color images
GNU General Public License v2.0
802 stars 252 forks source link

ValueError: Shape must be rank 1 but is rank 0 for 'import/single_obj_scoremap/Slice' (op: 'Slice') with input shapes: [4], [], [1]. #31

Closed byondrealdev closed 4 years ago

byondrealdev commented 5 years ago

I saved frozen model, then converted to a transformed model optimized for inference using Tensorflow TransformGraph, but when I now try to inspect the .pb file created by TransformGraph, I get the following error


Traceback (most recent call last):
  File "/Users/jyoti/code/hand3d/venv-latest/lib/python3.5/site-packages/tensorflow/python/framework/importer.py", line 427, in import_graph_def
    graph._c_graph, serialized, options)  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 1 but is rank 0 for 'import/single_obj_scoremap/Slice' (op: 'Slice') with input shapes: [4], [], [1].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "../tf-coreml/utils/inspect_pb.py", line 58, in <module>
    inspect(sys.argv[1], sys.argv[2])
  File "../tf-coreml/utils/inspect_pb.py", line 12, in inspect
    tf.import_graph_def(graph_def)
  File "/Users/jyoti/code/hand3d/venv-latest/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/Users/jyoti/code/hand3d/venv-latest/lib/python3.5/site-packages/tensorflow/python/framework/importer.py", line 431, in import_graph_def
    raise ValueError(str(e))
ValueError: Shape must be rank 1 but is rank 0 for 'import/single_obj_scoremap/Slice' (op: 'Slice') with input shapes: [4], [], [1].```
zimmerm commented 4 years ago

Thats unfortunate, but the information provided its hard to make suggestion about what might went wrong.