Doodles for Visualizing 1D Convolutions in TensorFlow

A guy named Evan asked a question about how to imagine 1D convolutions in TensorFlow. I responded with some hand-drawn sketches (which turned out pretty clean!). They might be useful to others in the future, so I figured this would be a decent stop-gap as I haven’t posted anything here in a while.

This is as good as time as any to mention that I’m working on a post whose intention is to visualize the convolution operation in more detail, emphasizing the intuitive 3D nature (and focusing less on the specific numbers).

Page 1 – Seeing 1D convolutions as a special case of 2D convolutions

Page 2 – visualizing the convolution operation

Read More

First TensorFlow Book is Published!

Man, it has been a while since I posted anything!

I’ve emerged from my writer’s cave (along with my co-authors), and have emerged with TensorFlow for Machine Intelligence! In my extremely biased opinion, it’s one of the best resources out there for people trying to get started with TensorFlow. I had a heavy hand in helping design the content of the book, and I wanted to make sure that learning the software was as digestible as possible. I’m not a huge fan of marketing buzz-speak, but one of our reviewers, Guillaume Binet, says

“Finally a TensorFlow book for humans.”

TensorFlow for Machine Intelligence
The book’s snazzy cover!

Mission Accomplished Sort Of!

I Have no idea how it’s going to sell, but hopefully a decent amount of people find the book helpful. Right now, a huge amount of the reward from this process has been getting even more deeply acquainted with the TensorFlow library. Plus, I can literally say “I wrote the book on it”.

I’ve been working on this with the fine folks at Bleeding Edge Press for several months, and while for a book the timeframe has been pretty short, this release feels like a long time coming.

Special thanks to my awesome co-authors Danijar Hafner, Erik Erwitt, and Ariel Scarpinelli. We had a few tight deadlines, but at the end of the day we’ve got an awesome book!

Read More

TensorFlow on Raspberry Pi: Just in Time for Pi Day!

This work was truly a team effort, so please check out the credits of the repo and give everyone there a warm e-hug.

TensorFlow gets smaller as it is getting bigger

Earlier today, I released instructions for compiling TensorFlow on the Raspberry Pi 3, as well as a pre-built Python wheel that can be used to install it directly. I’m hoping that this will enable some really cool projects involving both portable GPIO device-based learning and experimentation with TensorFlow’s distributed runtime. This has been an effort that has gone on since TensorFlow was open-sourced, and I’m really happy to be part of the group of people that made it happen.

What’s in the Repo

There are two main attractions to the repository: a pre-built Python wheel that can be used to easily install TensorFlow on a Raspberry Pi 3, and a step-by-step guide to building TensorFlow yourself.

Why Bother?

Several people have asked similar questions along the lines of: “Why would you want to run TensorFlow on a Raspberry Pi? Its compute power is miniscule.”

The first, quick answer: you probably don’t want to train your sophisticated models on a Raspberry Pi. Instead, train the model on a computer with more processing power (both CPU and GPU), and then move that pre-trained model onto the Pi for real-time use.

The second, more verbose answer:

With so much focus on the insane amount of computing power some companies are using to create breakthroughs in machine learning, such as Google’s AlphaGo recently beating Go champion Lee Sedol, it’s easy to get caught in the mindset that the only worthwhile machine learning problems require hundreds of GPUs. In truth, there are many applications that are on the opposite end of the spectrum- embedded devices with limited memory and processing power can also take advantage of machine learning. Unfortunately, you can’t keep throwing more hardware in a device smaller than your hand. We don’t want to require our smart health-monitors to be hooked up to the internet in order to detect anomalies- they should be able to use some sort of model built into the device. The hope is that by having a widely cross-compatible and powerful framework, the barrier to making ML-capable devices will be lowered and installing pre-trained models becomes less of a headache on devices with limited hardware.

Plus, having access to GPIO sensors and other devices could enable some really cool prototypes for machine learning that incorporate realtime data from their surroundings. Good stuff all around!

So check it out, let me know what works (and what doesn’t work), and let’s keep making TensorFlow a kick-ass framework with a kick-community.

Read More

TensorFlow Serving: TensorFlow in Production

More good news!

Google announced today that they’re releasing TensorFlow Serving a way to maintain machine learning models that are defined and trained in TensorFlow.

In a typical production setting, you want a way to replace in new models, or possibly train a model online. However, you need to be able to make this process seamless, or else risk losing service for a period of time. TensorFlow Serving offers a framework that manages the behind the scenes work of this process, so that the user can spend more time trying out new models. It’s in its infancy right now, but I’m excited to try it out soon.

Read More

TensorFlow White Pages Notes – On GitHub

Hey all!

Huge content in a short post. I just released my TensorFlow white paper notes on GitHub. It’s been a much larger project than I originally thought, but I hope that it will be useful to people. The notes go from the very beginning of the paper all the way through conclusions, highlighting the important information from each section.

Here are the top features of the notes:

  • Notes broken down and organized section by section, as well as subsection by subsection
  • Relevant links to documentation, resources, and references throughout
  • SVG versions of figures/graphs from the paper

If you haven’t checked out the TensorFlow white paper yet, I highly recommend it. There’s no replacement for reading the original, but I hope these notes are a worthy supplement alongside the actual paper.

Next up: Using TensorFlow on transformed Santa Monica Parking data

Read More