megengine.core.tensor.dtype.QuantDtypeMeta¶
- class QuantDtypeMeta(name, cname, np_dtype_str, qmin, qmax, is_unsigned=None)[源代码]¶
Store metadata for quantize dtype. Could be used to create custom quant dtype for QAT when the network don’t need to be converted for inference, but only to export network metadata for third-party platform inference.
- 参数
name – a unique name string.
cname – used in
create_quantized_dtype
for model dump and inference.np_dtype_str – used in
create_quantized_dtype
to generatenp.dtype
.qmin – a int number indicating quant dtype’s lowerbound.
qmax – a int number indicating quant dtype’s upperbound.
is_unsigned – a helper value that could be inference from np_dtype_str.
属性
Alias for field number 1
Alias for field number 5
Alias for field number 0
Alias for field number 2
Alias for field number 4
Alias for field number 3
方法
count
(value, /)Return number of occurrences of value.
index
(value[, start, stop])Return first index of value.