Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QAT example for TF backend #3164

Merged
merged 12 commits into from
Jan 16, 2025

Conversation

andrey-churkin
Copy link
Contributor

@andrey-churkin andrey-churkin commented Dec 20, 2024

Changes

Add simple QAT example for TF backend

Reason for changes

Ref: 158980

Related tickets

Ref: 158980

Tests

  • tests/tensorflow/quantization/test_strip.py
  • tests/tensorflow/sparsity/test_strip.py
  • tests/tensorflow/pruning/test_strip.py

@andrey-churkin andrey-churkin requested a review from a team as a code owner December 20, 2024 09:12
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 20, 2024
@andrey-churkin andrey-churkin changed the title QAT example for TF backend, QAT example for TF backend Dec 20, 2024
@github-actions github-actions bot added NNCF TF Pull requests that updates NNCF TensorFlow NNCF Common Pull request that updates NNCF Common labels Jan 14, 2025
@MaximProshin
Copy link
Collaborator

@daniil-lyakhov , please also review it

@andrey-churkin
Copy link
Contributor Author

NNCF/nightly/test_examples : 642

"""
Implementation of the nncf.strip() function for the TF backend
"""
wrapped_layers = collect_wrapped_layers(model)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexsu52 I just want to highlight. I will move the nncf.strip() call inside the convert_model() function, as we discussed. This means that the method will be called for every TensorFlow (TF) model, whether quantized or not. The collect_wrapped_layers() function will be called (for any TF model) to check if there are any of our layers. It traverses all layers.

Copy link
Contributor

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexsu52 alexsu52 merged commit 883c787 into openvinotoolkit:develop Jan 16, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation NNCF Common Pull request that updates NNCF Common NNCF TF Pull requests that updates NNCF TensorFlow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants