Shortcuts

线性

class torch.ao.nn.qat.Linear(in_features, out_features, bias=True, qconfig=None, device=None, dtype=None)[源代码]

一个附带了用于权重的FakeQuantize模块的线性模块,用于量化感知训练。

我们采用与torch.nn.Linear相同的接口,请参阅 https://pytorch.org/docs/stable/nn.html#torch.nn.Linear 获取文档。

类似于torch.nn.Linear,并初始化了默认的FakeQuantize模块。

Variables

权重 (torch.Tensor) – 权重的伪量化模块

classmethod from_float(mod)[源代码]

从浮点模块或qparams_dict创建一个qat模块 参数: mod 一个浮点模块,由torch.ao.quantization工具生成或直接由用户提供

优云智算