Skip to content

Commit

Permalink
Update add_nms.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyAB authored Jul 23, 2022
1 parent a5b853c commit aae7070
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/add_nms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import numpy as np
import onnx
from onnx import shape_inference
import onnx_graphsurgeon as gs
try:
import onnx_graphsurgeon as gs
except Exception as e:
print('Import onnx_graphsurgeon failure: %s' % e)

import logging

LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -148,4 +152,4 @@ def save(self, output_path):
self.graph.cleanup().toposort()
model = gs.export_onnx(self.graph)
onnx.save(model, output_path)
LOGGER.info(f"Saved ONNX model to {output_path}")
LOGGER.info(f"Saved ONNX model to {output_path}")

0 comments on commit aae7070

Please sign in to comment.