PerAxis#
- classtorch.ao.quantization.observer.PerAxis(axis)[source]#
Represents per-axis granularity in quantization.
This granularity type calculates different quantization parametersalong a specified axis of the tensor.
For example if the input tensor is shape [8, 16] and axis=0, thenthe quantization parameters are calculated for each row of the tensor.Giving a total of 8 quantization parameters.
- Variables
axis (int) – The axis along which reduction is performed.