[moco-tf] Bugfix of FixShapeTransform of Squeeze (#7031)
author남궁석/On-Device Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Mon, 2 Sep 2019 22:20:14 +0000 (07:20 +0900)
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Mon, 2 Sep 2019 22:20:14 +0000 (07:20 +0900)
commit55ebc861bafde178d5df087995cb74163e071d81
tree5670ef9cb07c338467ea29be60e102c4d1d6f701
parent2ce8c5b66c579a56a4b6c2861abcc2c6ade8c1b1
[moco-tf] Bugfix of FixShapeTransform of Squeeze (#7031)

If `Squeeze` operation have `squeeze_dims` as `[-1,-2]` and input rank is 4, it should be converted to `[2, 3]`
According to current implementation, the code erase -1 first and then put 3 in the `squeeze_dims`
However, it causes some bug. If -1 is erased, iterator of `squeeze_dims` points -2.
And then if 3 is inserted, the iterator points 3 because it is `Set`!
Now, `squeeze_dims` is `[-2, 3]` and iterator try to iterate next element but there is no more element
because 3 is the last element.

Therefore this commit will fix this bug by introducing new `Set`

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
compiler/moco-tf/src/Transforms/FixShapeTransform.cpp