Skip to main content

QConvWoQ

Weight-only-quantized channels-last convolution.

__init__

__init__(self, in_channels: 'int', out_channels: 'int', kernel: 'Sequence[int]', stride: 'Sequence[int]' = (), padding: 'Sequence[int]' = (), dilation: 'Sequence[int]' = (), groups: 'int' = 1, bias: 'bool' = False, *, mode: 'PadMode' = PadMode.Constant, value: 'float | None' = None, activation: 'Activation | None' = None, dtype: 'DataType' = DataType.Float32, device: 'Device | None' = None) -> 'None'

Declare the slots; same knob contract as :class:Conv.

extra_repr

extra_repr(self) -> 'str'

One line of per-class detail for :meth:__repr__ (a layer prints its geometry here).

forward

forward(self, x: 'Tensor') -> 'Tensor'

Subclasses define the computation here; call the module itself (m(x)), not forward directly.

set_weights

set_weights(self, weight: 'QTensor', bias: 'Tensor | None' = None) -> 'None'

Bind the quantized weight (its scheme travels with it) and the optional float bias.