Quantize Modules
Last updated
promote_to_qmodulepromote_to_qmodule(
cls: type[Module]
) → type[QConv1d] | type[QConv2d] | type[QConv3d] | type[QLinear] | NoneConvert a torch.nn.Module subclass to its quantized counterpart if exists.
cls (type[torch.nn.Module]): a subclass of a torch.nn.Module
type[QConv1d] | type[QConv2d] | type[QConv3d] | type[QLinear] | None: a quantized counterpart of the cls if exists. None otherwise.
enable_quantizersenable_quantizers(module: Module) → NoneEnable all fake quantizers in the module.
module (torch.nn.Module): The module containing fake quantizers to enable or disable.
disable_quantizersDisable all fake quantizers in the module.
module (torch.nn.Module): The module containing fake quantizers to enable or disable.
Updated: 2024-06-13T23:42:41
Last updated
disable_quantizers(module: Module) → None