[Tflite] Fix tf shape building
authorJihoon Lee <jhoon.it.lee@samsung.com>
Wed, 14 Apr 2021 11:02:18 +0000 (20:02 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 25 May 2021 11:40:53 +0000 (20:40 +0900)
commit180f6450db997cd49da9c83dc3fcc3573f379266
tree8b77b305f39987a21877eb9281f6e5d53de23677
parentf2f2043691047aa2be7d688f7a7f945f0f5b9ee3
[Tflite] Fix tf shape building

This patch fixes tf shape building, by adding `eff_dim_flag` and
`dyn_dim_flag`.

`eff_dim_flag` checks which dimension are actually used so that to be
squeezed.
`dyn_dim_flag` checks which dimension should be set to -1 (meaning it is
not fixed)

With those flag set, our tensor dim is able to convert to the dimension
representation that supports `-1` and not fixed size

Those fixes are apply to fc layer for now

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
nntrainer/compiler/tflite_interpreter.cpp
nntrainer/layers/fc_layer.cpp
nntrainer/tensor/tensor_dim.cpp
nntrainer/tensor/tensor_dim.h
test/unittest/unittest_nntrainer_layers.cpp
test/unittest/unittest_nntrainer_tensor.cpp