model-optimization
model-optimization copied to clipboard
A toolkit to optimize ML models for deployment for Keras and TensorFlow, including quantization and pruning.
**Describe the bug** tensorflow_model_optimization.quantization.keras.quantize_model function throws the following error with mobilenet v3. ``` Traceback (most recent call last): File "issue_report.py", line 14, in q_aware_model = tfmo.quantization.keras.quantize_model(model_mv3) File "/home/.local/lib/python3.8/site-packages/tensorflow_model_optimization/python/core/quantization/keras/quantize.py", line 137,...
This PR introduce two new schedulers for M_by_N sparsity - PolynomialDecayMbyNSparsity - ConstantMbyNSparsity #### [ConstantMbyNSparsity](https://github.com/tensorflow/model-optimization/pull/855/files#diff-15df3b8c3fdb2a06997a17f8c698e97b2e5533f85822bcba244be45b7d92f8bdR262-R277) Pruning model at step `prune_step`, that is, m_by_n sparsity masks calculate only at `prune_step` then...
Hi, I see that TF version 1's QAT library uses **zero_debias** as True. However, the TFMOT's quantization library calls the following in the quant_ops.py: _assign_min = moving_averages.assign_moving_average( min_var, range_min, ema_decay,...
### 1. System information - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): **Windows 10** - TensorFlow installation (pip package or built from source): **pip package** - TensorFlow library (version,...
### 1. System information - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.5 LTS - TensorFlow installation (pip package or built from source): pip - TensorFlow library (version,...
Remove experimental modules from top level API
**Describe the bug** Activity Regularizer not working with quantization aware training (QAT). On further evaluation I also saw that it creates a tensor of type `` for Actvity regularization loss...
**System information** - TensorFlow version (you are using): 2.5.0 - Are you willing to contribute it (Yes/No): Yes **Motivation** There is pruning result of GNMT EN-DE and GNMT DE-EN on...
Hello, I am trying to perform a QAT on a ResNet50 network with BN layers, and I keep getting the following error: ``` ValueError: Shape must be rank 4 but...
**System information** - TensorFlow version (you are using):2.6 - Are you willing to contribute it (Yes/No): **Motivation** Need to run OD models on device, after QAT. **Describe the feature** Currently...