torch.quantize_per_tensor
torch.quantize_per_tensor(input, scale, zero_point, dtype) -> Tensor
Converts a float tensor to a quantized tensor with given scale and
   zero point.
Parameters:
      * input (Tensor) -- float tensor or list of tensors to
        quantize
  * **scale** (*float** or **Tensor*) -- scale to apply in
    quantization formula

  * **zero_point** (*int** or **Tensor*) -- offset in integer
    value that maps to float zero

  * **dtype** ("torch.dtype") -- the desired data type of returned
    tensor. Has to be one of the quantized dtypes: "torch.quint8",
    "torch.qint8", "torch.qint32"

Returns:
      A newly quantized tensor or list of quantized tensors.
Return type:
      Tensor
Example:
  >>> torch.quantize_per_tensor(torch.tensor([-1.0, 0.0, 1.0, 2.0]), 0.1, 10, torch.quint8)
  tensor([-1.,  0.,  1.,  2.], size=(4,), dtype=torch.quint8,
