TF FE import model from memory (#15242)
* Added import model from memory for TF FE using string. * Small correction. * Clang format. * Code correction. * Implemented model importing to TF FE using temporary file. * Removed wrong changes. * Added check. * Removed code duplication. * Corrected logging of cli parameters.
This commit is contained in:
@@ -359,7 +359,6 @@ class TestMoConvertTF(CommonMOConvertTest):
|
||||
@pytest.mark.nightly
|
||||
@pytest.mark.precommit_tf_fe
|
||||
@pytest.mark.precommit
|
||||
@pytest.mark.xfail(reason="99426")
|
||||
def test_mo_import_from_memory_tf_fe(self, create_model, ie_device, precision, ir_version,
|
||||
temp_dir):
|
||||
fw_model, graph_ref, mo_params = create_model(temp_dir)
|
||||
|
||||
@@ -183,7 +183,6 @@ def arguments_post_parsing(argv: argparse.Namespace):
|
||||
elif (is_kaldi or is_onnx) and not argv.input_model:
|
||||
raise Error('Path to input model is required: use --input_model.')
|
||||
|
||||
log.debug(str(argv))
|
||||
log.debug("Model Optimizer started")
|
||||
|
||||
log.debug('Output model name would be {}{{.xml, .bin}}'.format(argv.model_name))
|
||||
@@ -771,6 +770,9 @@ def parse_input_shapes(argv):
|
||||
def driver(argv: argparse.Namespace, non_default_params: dict):
|
||||
init_logger(argv.log_level.upper(), argv.silent)
|
||||
|
||||
# Log dictionary with non-default cli parameters where complex classes are excluded.
|
||||
log.debug(str(non_default_params))
|
||||
|
||||
start_time = datetime.datetime.now()
|
||||
|
||||
graph, ngraph_function = prepare_ir(argv)
|
||||
|
||||
@@ -328,7 +328,8 @@ def convert_to_pb(argv: argparse.Namespace):
|
||||
# if this is already binary frozen format .pb, there is no need to create auxiliary binary frozen protobuf
|
||||
# the main thing is to differentiate this format from text frozen format and checkpoint
|
||||
# that can utilize input_model option
|
||||
if argv.input_model and not argv.input_model_is_text and not argv.input_checkpoint:
|
||||
if argv.input_model and not argv.input_model_is_text and not argv.input_checkpoint and \
|
||||
isinstance(argv.input_model, str):
|
||||
return None
|
||||
|
||||
user_output_node_names_list = argv.output.split(',') if argv.output else None
|
||||
|
||||
Reference in New Issue
Block a user