module owlite.nn.modules.qconv
class QConv1d
Applies a 1D convolution over an input signal composed of several input planes with quantized weight.
method __init__
python
__init__(
conv: Conv1d,
weight_options: FakeQuantizerOptions | None = None
) → None
Convert a Conv1d
instance to the analogous QConv1d
instance, copying weights and bias if exists.
Args:
conv
(torch.nn.Conv1d): aConv1d
instance to be converted toQConv1d
instance.weight_options
(FakeQuantizerOptions | None, optional): Option for the weight fake quantizer. Defaults to None.
method extra_repr
python
extra_repr() → str
method forward
python
forward(inputs: Tensor) → Tensor
Forward with quantized weight if available.
class QConv2d
Applies a 2D convolution over an input signal composed of several input planes with quantized weight.
method __init__
python
__init__(
conv: Conv2d,
weight_options: FakeQuantizerOptions | None = None
) → None
Convert a Conv2d
instance to the analogous QConv2d
instance, copying weights and bias if exists.
Args:
conv
(torch.nn.Conv2d): aConv2d
object to be converted toQConv2d
instance.weight_options
(FakeQuantizerOptions | None, optional): instance for the weight fake quantizer. Defaults to None.
method extra_repr
python
extra_repr() → str
method forward
python
forward(inputs: Tensor) → Tensor
Forward with quantized weight if available.
class QConv3d
Applies a 3D convolution over an input signal composed of several input planes with quantized weight.
method __init__
python
__init__(
conv: Conv3d,
weight_options: FakeQuantizerOptions | None = None
) → None
Convert a Conv3d
instance to the analogous QConv3d
instance, copying weights and bias if exists.
Args:
conv
(torch.nn.Conv3d): aConv3d
instance to be converted toQConv3d
instance.weight_options
(FakeQuantizerOptions | None, optional): Option for the weight fake quantizer. Defaults to None.
method extra_repr
python
extra_repr() → str
method forward
python
forward(inputs: Tensor) → Tensor
Forward with quantized weight if available.
Updated: 2024-06-13T23:42:42