I tried to do the export with ‘tf2onnx’ as the onnx_route. I had to also update the /usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/export/classification_exporter.py
file. Here is the error from the classification_tf1 export xx
command in the docker container.
2024-07-04 13:08:34,944 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.export.keras_exporter 119: Setting the onnx export route to tf2onnx
2024-07-04 13:08:34,944 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.makenet.export.classification_exporter 90: Setting the onnx export rote to tf2onnx
2024-07-04 13:08:35,040 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.export.keras_exporter 429: Using input nodes: ['input_1']
2024-07-04 13:08:35,040 [TAO Toolkit] [INFO] nvidia_tao_tf1.cv.common.export.keras_exporter 430: Using output nodes: ['predictions/Softmax']
Loaded model
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/export.py", line 70, in <module>
main()
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/export.py", line 66, in main
raise e
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/scripts/export.py", line 50, in main
run_export(Exporter, args=args, backend=backend)
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/export/app.py", line 289, in run_export
exporter.export(output_file,
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/common/export/keras_exporter.py", line 440, in export
self.save_exported_file(model, output_file_name)
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/cv/makenet/export/classification_exporter.py", line 228, in save_exported_file
input_tensor_names, out_tensor_names, _ = keras_to_pb(
File "/usr/local/lib/python3.8/dist-packages/nvidia_tao_tf1/core/export/_uff.py", line 241, in keras_to_pb
freeze_graph.freeze_graph(
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/tools/freeze_graph.py", line 346, in freeze_graph
return freeze_graph_with_def_protos(
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/tools/freeze_graph.py", line 228, in freeze_graph_with_def_protos
output_graph_def = graph_util.convert_variables_to_constants(
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/util/deprecation.py", line 330, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/framework/graph_util_impl.py", line 277, in convert_variables_to_constants
inference_graph = extract_sub_graph(input_graph_def, output_node_names)
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/util/deprecation.py", line 330, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/framework/graph_util_impl.py", line 197, in extract_sub_graph
_assert_nodes_are_present(name_to_node, dest_nodes)
File "/usr/local/lib/python3.8/dist-packages/tensorflow_core/python/framework/graph_util_impl.py", line 152, in _assert_nodes_are_present
assert d in name_to_node, "%s is not in graph" % d
AssertionError: predictions/Softmax is not in graph
Execution status: FAIL