fail to run tf2 example. #2129
Labels
bug
An unexpected problem or unintended behavior
pending on user response
Waiting for more information or validation from user
I want to convert a tf2 model to onnx, but it report a error.I go back to run example of convert a pretrained resnet50 model to test my usage. I run the notebook, the first way using scripts to convert running successfully, but the command line approach failed. the reported error are the same as my encountered when i convert my own model. how someone familiar with tf2onnx can help me with this.
Describe the bug
2023-03-01 14:31:35,400 - WARNING - '--tag' not specified for saved_model. Using --tag serve
2023-03-01 14:31:38,317 - INFO - Signatures found in model: [serving_default].
2023-03-01 14:31:38,318 - WARNING - '--signature_def' not specified, using first signature: serving_default
2023-03-01 14:31:38,318 - INFO - Output names: ['predictions']
Traceback (most recent call last):
File "convert.py", line 706, in
main()
File "convert.py", line 238, in main
graph_def, inputs, outputs, initialized_tables, tensors_to_rename = tf_loader.from_saved_model(
File "/home/hellc/miniconda3/envs/test/lib/python3.8/site-packages/tf2onnx/tf_loader.py", line 611, in from_saved_model
_from_saved_model_v2(model_path, input_names, output_names,
File "/home/hellc/miniconda3/envs/test/lib/python3.8/site-packages/tf2onnx/tf_loader.py", line 595, in _from_saved_model_v2
frozen_graph, initialized_tables = from_trackable(imported, concrete_func, inputs, outputs, large_model)
File "/home/hellc/miniconda3/envs/test/lib/python3.8/site-packages/tf2onnx/tf_loader.py", line 229, in from_trackable
_get_hash_table_info_from_trackable(trackable, table_info,
File "/home/hellc/miniconda3/envs/test/lib/python3.8/site-packages/tf2onnx/tf_loader.py", line 464, in _get_hash_table_info_from_trackable
for t in r.dict.values() if hasattr(r, 'dict') else []:
File "/home/hellc/miniconda3/envs/test/lib/python3.8/site-packages/tensorflow/python/training/tracking/data_structures.py", line 828, in getattribute
return super(_DictWrapper, self).getattribute(name)
TypeError: this dict descriptor does not support '_DictWrapper' objects
Urgency
System information
To Reproduce
just run the notebook, the command line part goes wrong.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: