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