本文简要介绍python语言中 torch.nn.intrinsic.qat.LinearReLU
的用法。
用法:
class torch.nn.intrinsic.qat.LinearReLU(in_features, out_features, bias=True, qconfig=None)
~LinearReLU.weight(torch.Tensor) -重量的假量化模块
由 Linear 和 ReLU 模块融合而成的 LinearReLU 模块,附加 FakeQuantize 权重模块,用于量化感知训练。
我们采用与
torch.nn.Linear
相同的接口。与
torch.nn.intrinsic.LinearReLU
类似,FakeQuantize 模块初始化为默认值。例子:
>>> m = nn.qat.LinearReLU(20, 30) >>> input = torch.randn(128, 20) >>> output = m(input) >>> print(output.size()) torch.Size([128, 30])
变量:
相关用法
- Python PyTorch LinearReLU用法及代码示例
- Python PyTorch LinearLR用法及代码示例
- Python PyTorch Linear用法及代码示例
- Python PyTorch LineReader用法及代码示例
- Python PyTorch LazyModuleMixin用法及代码示例
- Python PyTorch LKJCholesky用法及代码示例
- Python PyTorch L1Loss用法及代码示例
- Python PyTorch LPPool2d用法及代码示例
- Python PyTorch LeakyReLU用法及代码示例
- Python PyTorch LogSigmoid用法及代码示例
- Python PyTorch LowRankMixtureCrossNet用法及代码示例
- Python PyTorch LayerNorm用法及代码示例
- Python PyTorch LogNormal用法及代码示例
- Python PyTorch LambdaLR用法及代码示例
- Python PyTorch LocalResponseNorm用法及代码示例
- Python PyTorch LSTM用法及代码示例
- Python PyTorch LowRankMultivariateNormal用法及代码示例
- Python torchrec.modules.crossnet.LowRankCrossNet用法及代码示例
- Python PyTorch LogSoftmax用法及代码示例
- Python PyTorch LSTMCell用法及代码示例
- Python PyTorch LocalElasticAgent用法及代码示例
- Python PyTorch LPPool1d用法及代码示例
- Python PyTorch Laplace用法及代码示例
- Python PyTorch LazyModuleExtensionMixin.apply用法及代码示例
- Python PyTorch frexp用法及代码示例
注:本文由纯净天空筛选整理自pytorch.org大神的英文原创作品 torch.nn.intrinsic.qat.LinearReLU。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。