Skip to content

Commit 3aefee8

Browse files
Add nncf.strip call (#28660)
### Details: - Add the `nncf.strip()` method to the `ov.convert_model()` for the TF model. ### Tickets: - *158980* --------- Co-authored-by: Alexander Suslov <alexander.suslov@intel.com>
1 parent 91a8f17 commit 3aefee8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/ovc/openvino/tools/ovc/convert_impl.py

+6
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,12 @@ def _convert(cli_parser: argparse.ArgumentParser, args, python_api_used):
478478
get_jax_decoder(args['input_model'], args)
479479
else:
480480
raise Error("JAX Frontend is not available.")
481+
if model_framework == "tf" and "nncf" in sys.modules:
482+
try:
483+
from nncf.tensorflow.strip import strip as nncf_tf_strip
484+
args['input_model'] = nncf_tf_strip(args['input_model'])
485+
except:
486+
pass
481487

482488
argv = pack_params_to_args_namespace(args, cli_parser, python_api_used)
483489

0 commit comments

Comments
 (0)