Linear#
- class torch.ao.nn.qat.Linear(in_features, out_features, bias=True, qconfig=None, device=None, dtype=None)[原始碼]#
一個帶有 FakeQuantize 模組用於權重的線性模組,用於量化感知訓練。
我們採用與 torch.nn.Linear 相同的介面,請參閱 https://pytorch.com.tw/docs/stable/nn.html#torch.nn.Linear 獲取文件。
類似於 torch.nn.Linear,但 FakeQuantize 模組已初始化為預設值。
- 變數
weight (torch.Tensor) – 用於權重的 fake quant 模組