def __extract_metadata_and_output_tensor_names_from_model()

in src/neo_loader/tensorflow_model_loader.py [0:0]


    def __extract_metadata_and_output_tensor_names_from_model(self) -> None:
        try:
            self.__tf_model_helper.extract_input_and_output_tensors()
        except Exception as e:
            logger.warning("Try to extract input and output tensor for potential TF2 model.")
            try:
                self.__tf_model_helper.extract_input_and_output_tensors_v2()
                self.__is_tf2_model = True
            except Exception as error:
                logger.exception("Framework cannot load model. {}".format(error))
                raise RuntimeError("InputConfiguration: Framework cannot load Tensorflow model: {}".format(e))

        try:
            self.__output_tensor_names = [name.rstrip(":0") for name in self.__tf_model_helper.output_tensor_names]
            self._metadata = self.__tf_model_helper.get_metadata()
        except Exception as e:
            logger.exception("Framework cannot load model.")
            raise RuntimeError("InputConfiguration: Framework cannot load Tensorflow model: {}".format(e))