When running the command python -m tf2onnx.convert --saved-model /tmp/rl-agent_policy-edb46cce-15d8-45d2-95bc-7c82b6918874 --opset 14 --output model.onnx --signature_def serving_default I get the following error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/convert.py", line 617, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/convert.py", line 277, in main
output_path=args.output)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/convert.py", line 155, in _convert_common
g = process_tf_graph(tf_graph, const_node_values=const_node_values, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 439, in process_tf_graph
initialized_tables, tensors_to_rename, is_tflite, dequantize)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 488, in process_graphs
initialized_tables, is_tflite, dequantize)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 589, in process_parsed_graph
run_rewriters(g, rewriters, continue_on_error)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 361, in run_rewriters
raise ex
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/tfonnx.py", line 352, in run_rewriters
ops = func(g, g.get_nodes())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/rewriter/random_uniform.py", line 32, in rewrite_random_uniform
tmax = input2.inputs[0].get_tensor_value()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/tf2onnx/graph.py", line 314, in get_tensor_value
raise ValueError("get tensor value: '{}' must be Const".format(self.name))
ValueError: get tensor value: 'cache_size_distribution/cond/sub' must be Const
I am not able to understand what the error is since Opset 14 contains support for the Sub Operator type. Can someone please help?
This is a bug in the RandomUniform rewriter assuming the inputs are constant. #1710 will skip the rewriter in this case, allowing the handler to deal with the non-constant case.
Describe the bug
When running the command
python -m tf2onnx.convert --saved-model /tmp/rl-agent_policy-edb46cce-15d8-45d2-95bc-7c82b6918874 --opset 14 --output model.onnx --signature_def serving_default
I get the following error:I am not able to understand what the error is since Opset 14 contains support for the Sub Operator type. Can someone please help?
System information