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)
| 187 | return final_anchors |
| 188 | |
| 189 | def save(self, output_path): |
| 190 | """ |
| 191 | Save the ONNX model to the given location. |
| 192 | :param output_path: Path pointing to the location where to write out the updated ONNX model. |
| 193 | """ |
| 194 | self.graph.cleanup().toposort() |
| 195 | model = gs.export_onnx(self.graph) |
| 196 | output_path = os.path.realpath(output_path) |
| 197 | os.makedirs(os.path.dirname(output_path), exist_ok=True) |
| 198 | onnx.save(model, output_path) |
| 199 | log.info("Saved ONNX model to {}".format(output_path)) |
| 200 | |
| 201 | def update_preprocessor(self, batch_size): |
| 202 | """ |
no test coverage detected