intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
161 stars 42 forks source link

[API] support TENSOR_QUANT8_ASYMM_SIGNED #1168

Closed huningxin closed 4 years ago

huningxin commented 4 years ago

It derives from ANEURALNETWORKS_TENSOR_QUANT8_ASYMM_SIGNED. Its doc string is

A tensor of 8 bit signed integers that represent real numbers. Attached to this tensor are two numbers that can be used to convert the 8 bit integer to the real value and vice versa. These two numbers are: scale: a 32 bit floating point value greater than zero. zeroPoint: a 32 bit integer, in range [-128, 127]. The formula is: real_value = (integer_value - zeroPoint) * scale.

This type of tensor can be used for ops like AVERAGE_POOL_2D, CONV_2D and DEPTHWISE_CONV_2D.

huningxin commented 4 years ago

done by https://github.com/intel/webml-polyfill/pull/1156