MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / save

Method save

samples/python/efficientdet/create_onnx.py:105–115  ·  view source on GitHub ↗

Save the ONNX model to the given location. :param output_path: Path pointing to the location where to write out the updated ONNX model.

(self, output_path)

Source from the content-addressed store, hash-verified

103 break
104
105 def save(self, output_path):
106 """
107 Save the ONNX model to the given location.
108 :param output_path: Path pointing to the location where to write out the updated ONNX model.
109 """
110 self.graph.cleanup().toposort()
111 model = gs.export_onnx(self.graph)
112 output_path = os.path.realpath(output_path)
113 os.makedirs(os.path.dirname(output_path), exist_ok=True)
114 onnx.save(model, output_path)
115 log.info("Saved ONNX model to {}".format(output_path))
116
117 def update_preprocessor(self, input_format, input_size, preprocessor="imagenet"):
118 """

Callers 6

mainFunction · 0.95
mainFunction · 0.45
visualize_detectionsFunction · 0.45
concat_visualizationsFunction · 0.45
mainFunction · 0.45

Calls 3

toposortMethod · 0.80
cleanupMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected