Skip to content

Commit

Permalink
fix nerge problems
Browse files Browse the repository at this point in the history
  • Loading branch information
kprokofi committed May 2, 2024
1 parent 26cc9b0 commit 57542d1
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/otx/core/exporter/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,13 @@ def _postprocess_openvino_model(self, exported_model: openvino.Model) -> openvin

# name assignment process is similar to torch onnx export
if self.output_names is not None:
if len(exported_model.outputs) >= len(self.output_names):
<<<<<<< HEAD
for i, name in enumerate(self.output_names):
=======
if len(exported_model.outputs) != len(self.output_names):
msg = (
"Number of model outputs is greater than the number"
" of output names to assign. Please check output_names"
" argument of the exporter's constructor."
)
log.warning(msg)
if len(exported_model.outputs) != len(self.output_names):
msg = (
"Number of model outputs is greater than the number"
" of output names to assign. Please check output_names"
" argument of the exporter's constructor."
)
log.warning(msg)

for i, name in enumerate(self.output_names):
traced_names = exported_model.outputs[i].get_names()
Expand All @@ -312,7 +308,6 @@ def _postprocess_openvino_model(self, exported_model: openvino.Model) -> openvin
)
log.warning(msg)

>>>>>>> develop
exported_model.outputs[i].tensor.set_names({name})
else:
msg = (
Expand Down

0 comments on commit 57542d1

Please sign in to comment.