Runtime exit from the quantized region — identity under design B.
The converted, inference-time form of a DeQuantStub, produced by
lucid.quantization.convert / from_float. It marks where the
quantized region ends and float compute resumes. Because Lucid's sidecar
representation (design B) carries activations as (fake-quantized) float32
throughout — never as packed integers — there is nothing to unpack: the
forward is a plain identity and the module holds no state.
It is the passive twin of the active Quantize entry marker. Keeping
it in the graph (rather than deleting it) makes the quantized module tree
symmetric, so tooling that walks entry/exit pairs sees a balanced boundary.
Parameters
NoneThe class takes no constructor arguments; instances are created by
from_float from a DeQuantStub (there is no state to
carry over) or by calling DeQuantize() directly.Notes
- Pure identity in every mode — it never changes a tensor's dtype, shape, or values. Its role is documentary / structural, not numerical.
- Holds no buffers and no qparams; contrast with
Quantize, which carries the calibratedscale/zero_point. - A model may legally omit the dequant marker; it is retained for graph symmetry and to signal where float compute resumes.
Examples
>>> import lucid, lucid.nn as nn
>>> dq = nn.quantized.DeQuantize()
>>> x = lucid.randn(2, 3)
>>> bool((dq(x) == x).all().item()) # identity — nothing to unpack
TrueSee Also
- lucid.nn.quantized.DeQuantStub—The float-model marker this converts from.
- lucid.nn.quantized.Quantize—The active entry marker it mirrors.
- lucid.quantization.convert—Installs this layer from a calibrated model.