tensorflow / model-optimization

A toolkit to optimize ML models for deployment for Keras and TensorFlow, including quantization and pruning.
https://www.tensorflow.org/model_optimization
Apache License 2.0
1.49k stars 319 forks source link

Fix model loading from .keras files in Tensorflow 2.15 #1123

Open MaierOli2010 opened 6 months ago

MaierOli2010 commented 6 months ago

When loading models from .keras files, quantize layer weight number does not match stored number of weights as layer is build twice. In addition, the QuantizeWrapperV2 does not populate the base layer weights correctly as the order of calls seems off.

google-cla[bot] commented 6 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.