How to import the tensorflow lite interpreter in Python?
I'm developing a Tensorflow embedded application using TF lite on the Raspberry Pi 3b, running Raspbian Stretch.  I've converted the graph to a flatbuffer (lite) format and have built the TFLite static library natively on the Pi.  So far so good.  But the application is Python and there seems to be no Python binding available.  The Tensorflow Lite development guide (https://www.tensorflow.org/mobile/tflite/devguide) states "There are plans for Python bindings and a demo app."  Yet there is wrapper code in /tensorflow/contrib/lite/python/interpreter_wrapper that has all the needed interpreter methods.  Yet calling this from Python eludes me.  

I have generated a SWIG wrapper but the build step fails with many errors.  There is no readme.md describing the state of the interpreter_wrapper.  So, I wonder if the wrapper has worked for others and I should persist or is it fundamentally broken and I should look elsewhere (PyTorch)?  Has anyone found a path to the TFLite Python bindings for the Pi3?

I was able to write python scripts to do classification 1, object-detection (tested with SSD MobilenetV{1,2}) 2, and image semantic segmentation 3 on an x86 running Ubuntu and an ARM64 board running Debian.


How to build Python binding for TF Lite code: Build pip with recent TensorFlow master branch and install it (Yes, those binding was in TF 1.8. However, I don't know why they are not installed). See 4 for how to to build and install TensorFlow pip package.

