Skip to content

Commit

Permalink
Add nncf.strip call (#28660)
Browse files Browse the repository at this point in the history
### Details:
- Add the `nncf.strip()` method to the `ov.convert_model()` for the TF
model.
 
### Tickets:
 - *158980*

---------

Co-authored-by: Alexander Suslov <[email protected]>
  • Loading branch information
andrey-churkin and alexsu52 authored Feb 6, 2025
1 parent 91a8f17 commit 3aefee8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/ovc/openvino/tools/ovc/convert_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,12 @@ def _convert(cli_parser: argparse.ArgumentParser, args, python_api_used):
get_jax_decoder(args['input_model'], args)
else:
raise Error("JAX Frontend is not available.")
if model_framework == "tf" and "nncf" in sys.modules:
try:
from nncf.tensorflow.strip import strip as nncf_tf_strip
args['input_model'] = nncf_tf_strip(args['input_model'])
except:
pass

argv = pack_params_to_args_namespace(args, cli_parser, python_api_used)

Expand Down

0 comments on commit 3aefee8

Please sign in to comment.