Skip to content

Commit

Permalink
revert changes back
Browse files Browse the repository at this point in the history
  • Loading branch information
kprokofi committed May 2, 2024
1 parent 57542d1 commit a0dcf86
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/otx/core/exporter/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,14 @@ 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):
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):
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 Down

0 comments on commit a0dcf86

Please sign in to comment.