torch.fake_quantize_per_tensor_affine
torch.fake_quantize_per_tensor_affine(input, scale, zero_point, quant_min, quant_max) -> Tensor
Returns a new tensor with the data in "input" fake quantized using
   "scale", "zero_point", "quant_min" and "quant_max".
  \text{output} = min(     \text{quant\_max},     max(
  \text{quant\_min},         \text{std::nearby\_int}(\text{input}
  / \text{scale}) + \text{zero\_point}     ) )

Parameters:
      * input (Tensor) -- the input value(s), "torch.float32"
        tensor
  * **scale** (double scalar or "float32" Tensor) -- quantization
    scale

  * **zero_point** (int64 scalar or "int32" Tensor) --
    quantization zero_point

  * **quant_min** (*int64*) -- lower bound of the quantized domain

  * **quant_max** (*int64*) -- upper bound of the quantized domain

Returns:
      A newly fake_quantized "torch.float32" tensor
Return type:
      Tensor
Example: