Skip to content

Cannot convert Tensorflow protobuf to uff #184

@mhansinger

Description

@mhansinger

Hi,
I trained a model with tensorflow and export it as .pb file. I then try to convert it to a .uff file with convert-to-uff. Then I get this error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 18, in <module>
    from tensorflow import GraphDef
ImportError: cannot import name 'GraphDef'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/convert-to-uff", line 7, in <module>
    from uff.bin.convert_to_uff import main
  File "/usr/local/lib/python3.6/dist-packages/uff/__init__.py", line 2, in <module>
    from uff.converters.tensorflow.conversion_helpers import from_tensorflow  # noqa
  File "/usr/local/lib/python3.6/dist-packages/uff/converters/tensorflow/conversion_helpers.py", line 23, in <module>
    https://www.tensorflow.org/install/""".format(err))
ImportError: ERROR: Failed to import module (cannot import name 'GraphDef')
Please make sure you have TensorFlow installed.
For installation instructions, see:
https://www.tensorflow.org/install/

Tensorflow is installed as version 2.0.0. TensorRT is installed as version 5.1.5.0 from the .tar file.
Any idea how to fix this?

Thank you!

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