Add support for Tflite operator SPLIT (#3520)
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>
Mon, 22 Jul 2019 22:12:09 +0000 (23:12 +0100)
committerYao Wang <kevinthesunwy@gmail.com>
Mon, 22 Jul 2019 22:12:09 +0000 (15:12 -0700)
commit19eb829ee95465722b8d10b11bc5d00e3f3dedce
tree20fe79328644ebd00e0fb1576bfb50e6c144bcc1
parent443b5b465c961014c3f1bd7f26ca9134831bddff
Add support for Tflite operator SPLIT (#3520)

* [RFC] Initial support for Tflite operator SPLIT

This patch adds initial support for the tflite operator split. However
I am not yet sure how to handle the axis parameter for the split
operator and support it in the test infrastructure. Putting this up for
an initial review and comment.

The split operator in tflite according to
https://www.tensorflow.org/lite/guide/ops_compatibility

appears to take num_or_size_split as a 0D tensor.

I also note that tflite.split is one of the few operators that returns
multiple outputs and thus the helper routines in the tests needed some
massaging to make this work.

@apivarov , could you please review this ?

Thanks,
Ramana

* Fix the axis parameter

Add more tests

* Address review comments

* Try out frozen_gene's suggestion

* Handle split of 1 element

* int32 is only supported in tflite 1.14, let's check that version here.

* Keep this at python3.5

* Add packaging as a python package to be installed
docker/install/ubuntu_install_python_package.sh
python/tvm/relay/frontend/tflite.py
tests/python/frontend/tflite/test_forward.py