QFunctional
- class torch.ao.nn.quantized.QFunctional
Wrapper class for quantized operations.
The instance of this class can be used instead of the
torch.ops.quantizedprefix. See example usage below.
Wrapper class for quantized operations.
The instance of this class can be used instead of the
torch.ops.quantized prefix. See example usage below.
addExamples:
>>> q_add = QFunctional()
>>> a = torch.quantize_per_tensor(torch.tensor(3.0), 1.0, 0, torch.qint32)
>>> b = torch.quantize_per_tensor(torch.tensor(4.0), 1.0, 0, torch.qint32)
>>> q_add.add(a, b) # Equivalent to ``torch.ops.quantized.add(a, b, 1.0, 0)``
add
cat
mul
add_relu
add_scalar
mul_scalar