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** ReLU6 cannot be fused into Conv2D (Conv2D+BN+ReLU6) after QAT by using `keras.layers.Activation('relu6')` Following works fine: - `keras.layers.ReLU(6)` - `keras.layers.Activation('relu')` - `keras.layers.ReLU()` So the workaround is to stick...
Creates non-breaking changes where necessary in preparation for switching all of Keras to new serialization format.
Cast using FunctionType instead of input_signature
Changes external references to `keras.utils.serialize_keras_object/deserialize_keras_object` to legacy serialization API in preparation for switching all of Keras to new serialization format.
**Describe the bug** The current package includes path names upwards of 150 characters such as [`default_8bit_cluster_preserve_quantize_scheme.py`](https://github.com/tensorflow/model-optimization/blob/master/tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/default_8bit_cluster_preserve_quantize_scheme.py) which are in turn relatively short files deep in a hierarchy. On Windows, the...
The broken link to "enable pruning to improve latency" has been fixed in line 726, and the typos at lines 590 and 390 are fixed.
**System information** - TensorFlow version (you are using): 2.4.1 - Are you willing to contribute it (Yes/No): no **Motivation** The implementation of some models (e.g. SENet) requires the use of...
Change PruningSummaries to only log pruning information
**System information** TensorFlow version (installed from source or binary): 2.10 TensorFlow Model Optimization version (installed from source or binary): 0.7.3 Python version: 3.8 **Bug** Hi, I have been experimenting with...
Is there any way to use tfmot for Keras Yolov3-v4 model pruning, or any other object detection model.