This repository was archived by the owner on Apr 7, 2025. It is now read-only.
This repository was archived by the owner on Apr 7, 2025. It is now read-only.
Trying to convert weights to TensorRT Graph tensorflow version issue #28
Open
Description
Installed packages:
packages.txt
GTX 1070 8Gb memory, Ryzen 5, Ubuntu 20.04
When I try to convert the model weights to TensorRT engines I get the following error:
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 497, in _import_graph_def_internal
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'validate_shape' not in Op<name=AssignVariableOp; signature=resource:resource, value:dtype -> ; attr=dtype:type; is_stateful=true>; NodeDef: {{node AssignNewValue}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/compiler/tensorrt/trt_convert.py", line 1085, in convert
self._input_saved_model_tags)
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 578, in load
return load_internal(export_dir, tags)
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 604, in load_internal
export_dir)
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/saved_model/load.py", line 116, in __init__
meta_graph.graph_def.library))
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/saved_model/function_deserialization.py", line 311, in load_function_def_library
func_graph = function_def_lib.function_def_to_graph(copy)
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/framework/function_def_to_graph.py", line 63, in function_def_to_graph
importer.import_graph_def_for_function(graph_def, name="")
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 412, in import_graph_def_for_function
graph_def, validate_colocation_constraints=False, name=name)
File "/home/dt/miniconda3/envs/TensorRT/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 501, in _import_graph_def_internal
raise ValueError(str(e))
ValueError: NodeDef mentions attr 'validate_shape' not in Op<name=AssignVariableOp; signature=resource:resource, value:dtype -> ; attr=dtype:type; is_stateful=true>; NodeDef: {{node AssignNewValue}}. (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
What tensorflow version was used to save these weights? I am using the same requirements.txt for my environment but still running into this issue.
Metadata
Metadata
Assignees
Labels
No labels