From a0dcf863032f233be7906f4a0ea118bb8dc4bb8f Mon Sep 17 00:00:00 2001 From: kprokofi Date: Thu, 2 May 2024 21:18:48 +0900 Subject: [PATCH] revert changes back --- src/otx/core/exporter/base.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/otx/core/exporter/base.py b/src/otx/core/exporter/base.py index 2f7a828d7ed..34cc5e4f4fa 100644 --- a/src/otx/core/exporter/base.py +++ b/src/otx/core/exporter/base.py @@ -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()