megengine.core.tensor.dtype.convert_to_qint8

convert_to_qint8(arr, q)[源代码]

Quantize a float NumPy ndarray into a qint8 one with specified params.

参数
  • arr (ndarray) – Input ndarray.

  • q (dtype) – Target data type, should be a qint8.