megengine.core.tensor.dtype.convert_to_qint32

convert_to_qint32(arr, q)[源代码]

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

参数
  • arr (ndarray) – Input ndarray.

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