One: Channel-wise INT16 quantization support

Created on 28 Sep 2020  路  3Comments  路  Source: Samsung/ONE

We need to support channel-wise INT16 quantization in one-quantize.

  • [x] circle-tensordump
  • [x] luci
  • [x] pota-quantization-value-test (for 12 operators)
  • [x] one-quantize
arequant

All 3 comments

I reopened this issue to support int64 bias.

Things to do

  • [x] Remove test data for int16 in pota-quantization-value-test
  • [x] Implement int64 bias code (after this issue is resolved)
  • [x] Add new test data for int16 in pota-quantization-value-test
  • [x] Give examples for one-quantize with int16 option

Example

one-quantize can use int16 quantization by passing int16 to --quantized_dtype and channel to --granularity.

one-quantize \
--input_dtype float32 \
--quantized_dtype int16 \
--granularity channel \
--input_path ./inception_v3.circle \
--input_data ./inception_v3_test_data.h5 \
--output_path ./inception_v3.quantized.circle

Negative example

We only support CWQ int16 quantization. If you try to do int16 quantization with layer (default granularity), the below error message will be printed.

one-quantize \
--input_dtype float32 \
--quantized_dtype int16 \
--input_path ./inception_v3.circle \
--input_data ./inception_v3_test_data.h5 \
--output_path ./inception_v3.quantized.circle
ERROR: Layer-wise quantization only supports uint8 dtype.

CC @seanshpark

I close this issue as all jobs required for int64 bias are done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KimDongEon picture KimDongEon  路  4Comments

underflow101 picture underflow101  路  4Comments

mhs4670go picture mhs4670go  路  3Comments

ragmani picture ragmani  路  4Comments

periannath picture periannath  路  3Comments