• 文档 >
  • 量化 >
  • 量化 API 参考 >
  • 线性 ReLU
快捷键

线性 ReLU ¶

class torch.ao.nn.intrinsic.quantized.LinearReLU(in_features, out_features, bias=True, dtype=torch.qint8)[source][source]

由线性层和 ReLU 模块融合而成的 LinearReLU 模块

我们采用与 torch.ao.nn.quantized.Linear 相同的接口。

变量:

torch.ao.nn.quantized.Linear (与) –

示例:

>>> m = nn.intrinsic.LinearReLU(20, 30)
>>> input = torch.randn(128, 20)
>>> output = m(input)
>>> print(output.size())
torch.Size([128, 30])

© 版权所有 PyTorch 贡献者。

使用 Sphinx 构建,主题由 Read the Docs 提供。

文档

查看 PyTorch 的全面开发者文档

查看文档

教程

深入了解初学者和高级开发者的教程

查看教程

资源

查找开发资源并获得您的疑问解答

查看资源