快捷方式

线性层

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 模块

classmethod from_float(mod, use_precomputed_fake_quant=False)[源代码][源代码]

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

文档

访问 PyTorch 的全面开发者文档

查看文档

教程

获取针对初学者和高级开发者的深入教程

查看教程

资源

查找开发资源并获得问题解答

查看资源