[Frontend][TFLite] Dynamically calculate input_stats of any fake_quant range (#4789)
authorIna Dobreva <55383260+inadob@users.noreply.github.com>
Wed, 5 Feb 2020 19:51:59 +0000 (19:51 +0000)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 19:51:59 +0000 (11:51 -0800)
commit2989d72561a102b009adb45eb6ad78aa9a800804
treebd6bfc6094ccb23ca6346550464aa149da7e1f19
parent019356f810f7de27ba5f9f346f051d5b89a88c3e
[Frontend][TFLite] Dynamically calculate input_stats of any fake_quant range (#4789)

* [TFLite] Dynamically calculate input_stats of any fake_quant range

* pass the input range to the convertor and caclulate (mean, scale) there
* change the range of the second tensor in elemwise operations
  so that we test inputs with different quant params
* change the possible output range for elemwise ops wrt the updated ranges
* update the comments for (m, s) calculations
* add input range dict to reduce_mean op

* Apply requested changes

* add exception handling for zero division in input_stats
* fix range of the input tensor in elemwsie
tests/python/frontend/tflite/test_forward.py