Practical overview
When it fits
Use QKeras when working in a TensorFlow Keras model workflow and you want to construct a quantized version by replacing supported layers and quantizing operations.
Who it is for
- Developers building or adapting deep-learning models with Keras.
- Researchers experimenting with quantized parameters, activations and operations.
- Teams prototyping neural networks intended for hardware-accelerated implementation.
Documented uses
- Replace selected Keras layers with quantized counterparts in a model.
- Apply quantization to activation and mathematical operations.
- Experiment with quantizer settings such as bit width, integer bits and numeric range.
Requirements & limits
The public GitHub repository specifies an Apache-2.0 license.
- Model changes are required: parameter-creating layers need quantized counterparts, and mathematical operations need quantization afterward.
- Quantizer settings include bit width and integer-bit allocation; range settings may need adjustment for values outside [-1, 1].
- The README flags limitations around some high-level layer-wrapper combinations and says the QActivation save-and-restore interface has not been fully tested.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Replace Keras layers with quantized counterparts
Create a quantized Keras model by replacing parameter-creating layers and quantizing layers that perform math operations.
Before you start
- A Keras model with variable-creating layers such as Dense or Conv2D.
- QKeras quantized counterparts such as QDense or QConv2D.
Steps
Replace variable-creating layers in the model, such as Dense and Conv2D, with their QKeras counterparts, such as QDense and QConv2D.
Quantize any layers that perform math operations.
Expected outcome
The model is configured as a quantized version of the Keras network.
Guide limitations
- The guidance does not specify installation, code syntax, training or inference steps, or how to choose quantization settings.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 November 2026
- Original website title
- google/qkeras · Official homepage title · retained in its source language

