Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-churkin committed Jan 14, 2025
1 parent c1faf40 commit f993534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def transform_fn(data_item):

calibration_dataset = nncf.Dataset(val_dataset, transform_fn)
tf_quantized_model = nncf.quantize(tf_model, calibration_dataset)
tf_quantized_model = nncf.strip(tf_quantized_model)

tf_quantized_model.compile(
optimizer=tf.keras.optimizers.Adam(learning_rate=1e-5),
Expand All @@ -168,7 +167,8 @@ def transform_fn(data_item):
# Benchmark performance, calculate compression rate and validate accuracy

ov_model = ov.convert_model(tf_model, share_weights=False)
ov_quantized_model = ov.convert_model(tf_quantized_model, share_weights=False)
stripped_model = nncf.strip(tf_quantized_model)
ov_quantized_model = ov.convert_model(stripped_model, share_weights=False)

fp32_ir_path = ROOT / "mobilenet_v2_fp32.xml"
ov.save_model(ov_model, fp32_ir_path, compress_to_fp16=False)
Expand Down
2 changes: 1 addition & 1 deletion nncf/common/strip.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def strip(model: TModel, do_copy: bool = True) -> TModel:

return strip_pt(model, do_copy) # type: ignore
elif model_backend == BackendType.TENSORFLOW:
from nncf.tensorflow import strip as strip_tf
from nncf.tensorflow.strip import strip as strip_tf

return strip_tf(model, do_copy)

Expand Down

0 comments on commit f993534

Please sign in to comment.