webml-polyfill icon indicating copy to clipboard operation
webml-polyfill copied to clipboard

[Test] Add real-model test cases based on MobileNet Int8 model

Open cuiyanx opened this issue 5 years ago • 0 comments

Create test case based on MobileNet Int8 model:

  1. Int8ConvRelu op -> CONV_2D

    • Create input operand with TENSOR_QUANT8_ASYMM_SIGNED, set scale based on scales of bias and weights (scale_bias/scale_weights), zero point is 0

    • Create weights operand with TENSOR_QUANT8_SYMM_PER_CHANNEL, set scale based on scale of weights, set value (s8) from init_net_int8

    • Create bias operand with Map TENSOR_INT32, set value (s32) /from init_net_int8

    • Create output operand with TENSOR_QUANT8_ASYMM_SIGNED, set scale based on next op’s input scale, zero point is 0

  2. Int8ConvRelu op with groups -> DEPTHWISE_CONV_2D

    • Similar to CONV_2D, but handle the groups to depthwise mapping, refer to ONNX importer.

cuiyanx avatar Mar 17 '20 07:03 cuiyanx