Linear#
- class torch.ao.nn.qat.Linear(in_features, out_features, bias=True, qconfig=None, device=None, dtype=None)[source]#
一个线性模块,附加了权重的 FakeQuantize 模块,用于量化感知训练。
我们采用与 torch.nn.Linear 相同的接口,请参阅 https://pytorch.ac.cn/docs/stable/nn.html#torch.nn.Linear 获取文档。
与 torch.nn.Linear 类似,FakeQuantize 模块已初始化为默认值。
- 变量
weight (torch.Tensor) – 权重 FakeQuantize 模块