Add a workaround when scale for TENSOR_QUANT8_ASYMM is zero (#1605)
author서상민/동작제어Lab(SR)/Staff Engineer/삼성전자 <sangmin7.seo@samsung.com>
Fri, 8 Jun 2018 01:03:26 +0000 (10:03 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Fri, 8 Jun 2018 01:03:26 +0000 (10:03 +0900)
commitfba93077f77da374827db941fde31f12e76d3222
treeed6ba0f2215f438af45d9dc79798af8fb8e42702
parent96c2f04bd7b44ff6c2f7a2b535b207957e9c08a7
Add a workaround when scale for TENSOR_QUANT8_ASYMM is zero (#1605)

This patch adds a workaround, which changes `scale` to one when tensor's
scale is zero, because currently zero scale is passed down from TF Lite.
Note that the latest NeuralNetworks.h (see
https://android.googlesource.com/platform/frameworks/ml/+/master/nn/runtime/include/NeuralNetworks.h)
requires `scale` to be greater than zero.  Remove this workaround when
the scale value is correctly passed.

Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
libs/support/tflite/src/nnapi_delegate.cpp