ReLU6#
- class torch.ao.nn.quantized.ReLU6(inplace=False)[source]#
Applies the element-wise function
, where is the zero_point, and is the quantized representation of number 6.
- 参数
inplace (bool) – can optionally do the operation in-place. Default:
False
- 形状
Input: where * means, any number of additional dimensions
Output: , same shape as the input
示例
>>> m = nn.quantized.ReLU6() >>> input = torch.randn(2) >>> input = torch.quantize_per_tensor(input, 1.0, 0, dtype=torch.qint32) >>> output = m(input)