You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pls help me. Thank you very much. I am trying to convert tf2 model to onnx using graphfile.
But got this error:
2023-02-03 15:59:30.193108: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1613] Created device /job:localhost/replica:0/task:0/device:GPU:7 with 30969 MB memory: -> device: 7, name: Tesla V100S-PCIE-32GB, pci bus id: 0000:41:00.0, compute capability: 7.0
2023-02-03 15:59:39,646 - INFO - Using tensorflow=2.11.0, onnx=1.13.0, tf2onnx=1.13.0/2c1db5
2023-02-03 15:59:39,646 - INFO - Using opset <onnx, 13>
Traceback (most recent call last):
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/convert.py", line 706, in
main()
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/convert.py", line 269, in main
model_proto, _ = _convert_common(
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/convert.py", line 164, in _convert_common
g = process_tf_graph(tf_graph, const_node_values=const_node_values,
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tfonnx.py", line 459, in process_tf_graph
main_g, subgraphs = graphs_from_tf(tf_graph, input_names, output_names, shape_override, const_node_values,
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tfonnx.py", line 474, in graphs_from_tf
ordered_func = resolve_functions(tf_graph)
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tf_loader.py", line 760, in resolve_functions
_, _, _, _, _, functions = tflist_to_onnx(tf_graph, {})
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tf_utils.py", line 441, in tflist_to_onnx
onnx_tensor = tf_to_onnx_tensor(value, name=port_name(node.name))
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tf_utils.py", line 52, in tf_to_onnx_tensor
np_data = get_tf_tensor_data(tensor)
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tf2onnx/tf_utils.py", line 70, in get_tf_tensor_data
np_data = tensor_util.MakeNdarray(tensor)
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tensorflow/python/framework/tensor_util.py", line 595, in MakeNdarray
dtype = tensor_dtype.as_numpy_dtype
File "/data/home/hujie/miniconda3/envs/py39/lib/python3.8/site-packages/tensorflow/python/framework/dtypes.py", line 98, in as_numpy_dtype
return _TF_TO_NP[self._type_enum]
KeyError: 21`
This section can be obtained by running get_version.py from util folder.
Python version: 3.8.13
ONNX version: 1.13.0
ONNX-TF version: 1.13.0/2c1db5
Tensorflow version: 2.11.0
Additional context
Have considered this issue maybe similar #299 , and also install onnx-tf, but not fix.
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Pls help me. Thank you very much. I am trying to convert tf2 model to onnx using graphfile.
But got this error:
This section can be obtained by running
get_version.py
from util folder.Additional context
Have considered this issue maybe similar #299 , and also install onnx-tf, but not fix.
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: