In my last post on this thread I left off stating that I would be troubleshooting TensorFlow 2.0 on the Raspberry Pi 0W.
After more than a week of effort I have made only a little bit of progress. I was able to successfully run a TensorFlow lite model on the RPI0W using the TensorFlow on Arm wheel package. My program completed six predictions in a blazing 1 hour and 45 minutes!
Just so that I would feel good about these results, I loaded the same program onto a RPI3B+. It executed in a very reasonable 35 seconds. There is something to be said about an additional 500 Mb memory, 3 more processor cores running a couple hundred Mhz faster, and a much improved ARM architecture. The average per prediction time was right on point with Inception v4 embedded CPU benchmarks listed on the Coral site.
In the process of exploring solutions for the RPI0W we attempted to compile TensorFlow 2.0 with appropriate options to create a cp37 armv6 wheel, but have run into numerous roadblocks. Tensorflow compilation files pull an Ubuntu 16.04 Docker image along with a couple of PPAs to upload Python 3.7, but even after correctly specifying build options it still only produces a cp35 (Python 3.5) file–the highest version on Ubuntu 16.04.
We also attempted to update the TensorFlow compilation instructions for Docker to pull Ubuntu 19.10. With this and other minor changes, the compilation executed until the very last stage where numerous Bazel/C++ compilation errors were ejected. Hardly any of these errors had substantial online discussion. It was too much guess work to run them all down while on company time. For the time being we are moving to the RPI3B+ to perform our predictions using the TensorFlow on Arm wheel package.
After all this wrangling with trying to compile TensorFlow, I wish I can say good things about the manner in which TensorFlow is manually compiled. However, it seems very sloppily managed. The project has gained too much importance to not keep the compilation libraries current and tested to ensure that the major compilation options work on the supported architectures.