Linear

class Linear(in_features, out_features, bias=True, compute_mode='default', **kwargs)[source]

A QATModule version of Linear. Could be applied with Observer and FakeQuantize.

Parameters
  • in_features (int) – size of each input sample.

  • out_features (int) – size of each output sample.

  • bias (bool) – If set to False, the layer will not learn an additive bias. Default: True

classmethod from_float_module(float_module)[source]

Return a QATModule instance converted from a float Module instance.