QKerasV3 Documentation
QKerasV3 is a Keras 3–compatible continuation of QKeras, focused on quantization-aware training and model compression.
Important
QKerasV3 supports TensorFlow, JAX and PyTorch as backend (default is TensorFlow). Set the backend before importing:
export KERAS_BACKEND=tensorflow/jax/torch
In the current version v1.2.x AutoQKeras and Pruning are not working. There will be an update in the the future to support this feature again.
QKerasV3 Layer Backend Support Matrix
The following matrix tracks multi-backend framework support for quantization-aware training (QAT) layers in qkerasV3.
Layer Name |
TensorFlow |
JAX |
PyTorch |
Implementation Notes & Constraints |
|---|---|---|---|---|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
MobileNet-specific; explicitly quantizes activation values immediately after the depthwise step. TODO: needs a test. |
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
⚠️ |
Combines |
|
⚠️ |
⚠️ |
⚠️ |
Experimental Stage: Stochastic activation functions often offset its regularization needs. JAX/Torch rely on Keras 3 epoch variable updates. |
|
✅ |
⚠️ |
⚠️ |
Multi-frequency feature extraction relies on complex tensor splitting and slicing across backends. TODO: needs a test. |
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
Legend:
✅ Supported: Tested and functions smoothly natively across the backend via Keras 3.
⚠️ Partial / Experimental / Conditional: Functions, but exhibits structural constraints, layout edge cases, or relies on features currently in testing.
QKerasV3 Activation Function Backend Support Matrix
The following matrix tracks multi-backend framework support for quantization activation functions in qkerasV3.
Activation Function |
TensorFlow |
JAX |
PyTorch |
Implementation Notes & Constraints |
|---|---|---|---|---|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
Legend:
✅ Supported: Tested and functions smoothly natively across the backend via Keras 3.
⚠️ Partial / Experimental / Conditional: Functions, but exhibits structural constraints, layout edge cases, or relies on features currently in testing.
Getting started
Guides
Reference
Unsupported Keras 3 Layers & Activations
``MultiHeadAttention`` / ``GroupQueryAttention`` (Layer)
``ConvLSTM1D`` / ``ConvLSTM2D`` / ``ConvLSTM3D`` (Layer)
``LayerNormalization`` / ``GroupNormalization`` / ``RMSNormalization`` (Layer)
``PReLU`` / ``ELU`` / ``LeakyReLU`` (Layer)
``AlphaDropout`` / ``GaussianNoise`` / ``GaussianDropout`` (Layer)
``mish(x)`` (Activation)
``swish(x)`` / ``gelu(x)`` (Activation)
``exponential(x)`` (Activation)
``silu(x)`` (Activation)