Conv1d#
- class torch.ao.nn.quantized.Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)[source]#
将 1D 卷积应用于由多个量化输入平面组成的量化输入信号。
有关输入参数、参数和实现细节,请参阅
Conv1d
。注意
padding_mode
参数仅支持 zeros。注意
输入数据类型仅支持 torch.quint8。
有关其他属性,请参阅
Conv1d
。示例
>>> m = nn.quantized.Conv1d(16, 33, 3, stride=2) >>> input = torch.randn(20, 16, 100) >>> # quantize input to quint8 >>> q_input = torch.quantize_per_tensor(input, scale=1.0, zero_point=0, ... dtype=torch.quint8) >>> output = m(q_input)