model-optimization
model-optimization copied to clipboard
A toolkit to optimize ML models for deployment for Keras and TensorFlow, including quantization and pruning.
https://github.com/google-research/bert Thank you very much!
Hi, I'm trying to apply tfmot for [an implementation of BiSeNetV2](https://github.com/VXallset/BiSeNet_V2.Tensorflow), when executing `tfmot.quantization.keras.quantize_model`, I meet errors with the following operations: tf.reduce_mean: Layer tf.math.reduce_mean: is not supported. You can quantize...
**System information** - TensorFlow version (you are using): 2.8 - Are you willing to contribute it (Yes/No): Yes **Motivation** This would be beneficial for models that use this layer -...
Currently the pruning API will throw an error when a subclassed model is passed to it. Users can get around this by diving into the subclassed models and applying pruning...
**System information** - TensorFlow version (you are using):2.5 - Are you willing to contribute it (Yes/No):Yes **Motivation** What is the use case and how does it broadly benefits users? Prioritization...
Proposing to remove extra commas after x_train at 153 and 191 to avoid converting the values to tuple ones.
**Describe the bug** I need help in this one please: I want to re-implent the "strip_pruning" function described in this link (line 222): https://github.com/tensorflow/model-optimization/blob/v0.7.2/tensorflow_model_optimization/python/core/sparsity/keras/prune.py#L222-L270 But I want this time to...
Right now if I do something like # Quantize functional model inputs = tf.keras.Input((3,)) out = tf.keras.layers.Dense(2)(inputs) seq = tf.keras.Sequential() seq.add(tf.keras.layers.Dense(2)) model = tf.keras.Model(inputs, seq(inputs)) quantized_model = quantize_model(model) I get...
Hi all, I am working on quantization. I have a .h5 model. I want to convert the weights from float 32 to int8 or float16. It seem to be "...
**Describe the bug** Unable to prune/quantize multiple layers at the same time **System information** TensorFlow version (installed from source or binary): 2.4.0 TensorFlow Model Optimization version (installed from source or...