coreai_opt.quantization.spec.PerChannelGranularity¶
- class coreai_opt.quantization.spec.PerChannelGranularity[source]¶
Bases:
QuantizationGranularityPer-channel quantization granularity.
This applies quantization to a specific channel which is selected through the
axisargument. WhenaxisisNone(the default),Quantizer.prepare()automatically resolves it based on the module type for weight quantization.Note: axis can be negatively indexed as per standard Python style indexing. For example, with a block sizes list: [10, 20, 30], a valid set of axis include -3 <= axis < 3