Tensor Quantization #
This module lifts the scalar affine quantizer from NN.Floats.Quantization pointwise over
TorchLean's shape-indexed tensors. The numerical definition remains usable without importing the
tensor library; only this adapter depends on NN.Spec.
Apply the affine quantizer independently at every coordinate of an arbitrary-rank tensor.
Instances For
Reconstruct every code in an arbitrary-rank tensor on the quantizer's real grid.
Instances For
Pointwise condition saying that quantization does not clip any coordinate of x.
Instances For
Pointwise condition saying that every stored code belongs to the quantizer's code set.
Instances For
Every coordinate produced by tensor quantization lies in the declared code interval.
Pointwise order is preserved by tensor quantization.
An in-range code tensor survives pointwise dequantization and requantization exactly.
If no coordinate clips, every tensor reconstruction error is at most half a step.