LinearBn1d#
- class torch.ao.nn.intrinsic.qat.modules.linear_fused.LinearBn1d(in_features, out_features, bias=True, eps=1e-05, momentum=0.1, freeze_bn=False, qconfig=None)[source]#
A LinearBn1d module is a module fused from Linear and BatchNorm1d, attached with FakeQuantize modules for weight, used in quantization aware training.
We combined the interface of
torch.nn.Linearand :class:torch.nn.BatchNorm1d`.Similar to
torch.nn.Linear, with FakeQuantize modules initialized to default.- Variables:
freeze_bn –
weight_fake_quant – fake quant module for weight