A Binary Release for TensorFlow on the Raspberry Pi

Alasdair Allan
3 min readAug 3, 2018

In the past it wasn’t so easy to get TensorFlow installed onto the Raspberry Pi, but this time last year Pete Warden finally managed to successfully get it to cross-compile. From there he set up nightly builds running as part of Google’s TensorFlow Jenkins project. This simplified installation, a lot.

But today’s announcement, that the latest 1.9 release of TensorFlow can be installed from pre-built binaries, is a much bigger step towards making machine learning on the Raspberry Pi just that much more accessible.

Top view of the Raspberry Pi 3 Model B+ (📷: The Raspberry Pi Foundation)

“TensorFlow makes it possible to turn messy, chaotic sensor data from cameras and microphones into useful information, so running models on the Pi has enabled some fascinating applications, from predicting train times, sorting trash, helping robots see, and even avoiding traffic tickets!” — Pete Warden, Google

If you’re not familiar with the Google’s TensorFlow, it is an open source library for numerical computation using data-flow graphs, and Amy Unruh has written a really good introductory article to the popular machine learning platform.

“Since TensorFlow launched there’s been amazing work by the community to get it running well on the Raspberry Pi. I’m excited we’ve been able to build on that to create an easy to use official release, because I believe Pi’s are a fantastic way to experiment with machine learning on the edge. There have already been some amazing applications like DonkeyCar, and I can’t wait to see what else people come up with!”—Pete Warden, Google

While Warden has done some V4C deep learning in the past, the new binary release of TensorFlow doesn’t make use of the Raspberry Pi’s VideoCore to accelerate things, as Warden puts it “…it doesn’t use the VideoCore at the moment. With quad-core CPUs and Neon on the latest Pi’s, there’s not as big an advantage, though it’s still interesting on Pi Zeroes.”

This isn’t the first venture into “do-it-yourself” artificial intelligence for Google, or their first collaboration with the Raspberry Pi Foundation. The company’s AIY Project Voice and Vision Kits have already brought Tensor Flow to the Raspberry Pi. However, while it was possible to run TensorFlow locally on your Raspberry Pi with the kit, it really struggled with that. The Voice Kit, at least, was really intended to be used with the Google Cloud.

Today’s release is presumably also another part of Google’s new company wide initiative, that they’re calling “Cloud-to-Edge Machine Learning,” that saw the announcement of their own custom ASIC, called the Edge TPU at the Google Next Conference just last week.

Full details on installing, and then troubleshooting, TensorFlow on the Raspberry Pi can be found on the Google TensorFlow website.