module owlite.nn.modules
function promote_to_qmodule
python
promote_to_qmodule(
cls: type[Module]
) → type[QConv1d] | type[QConv2d] | type[QConv3d] | type[QLinear] | None
Convert a torch.nn.Module subclass to its quantized counterpart if exists.
Args:
cls
(type[torch.nn.Module]): a subclass of a torch.nn.Module
Returns:
type[QConv1d] | type[QConv2d] | type[QConv3d] | type[QLinear] | None
: a quantized counterpart of thecls
if exists. None otherwise.
function enable_quantizers
python
enable_quantizers(module: Module) → None
Enable all fake quantizers in the module.
Args:
module
(torch.nn.Module): The module containing fake quantizers to enable or disable.
function disable_quantizers
python
disable_quantizers(module: Module) → None
Disable all fake quantizers in the module.
Args:
module
(torch.nn.Module): The module containing fake quantizers to enable or disable.
Updated: 2024-06-13T23:42:41