Thursday, May 18, 2017

Breakout Session: TensorFlow for Non-experts

Opened with "TensorFlow is truly what enables apps to tell Hot Dogs from Not Hot Dogs" (shout out to Silicon Valley) which got a good laugh from the crowd.

TensorFlow is distributed out of the box, fast and flexible, runs anywhere. Here's the architecture:


In order to create a model you need to create a hash for the input, then need to use a regressor (in our example he's using a LinearRegressor) and then you need input data for training the model.  Loss curve is important when testing - means that over time (each iteration) the model is getting better at estimating the output:


It also includes a graph that also shows the linear model in relation to the other components (linear model is in red):

Here's a zoom in on the actual model:


The idea here is that the linear model is an estimator.  It has several methods - train, evaluate, predict, and export the saved model.  Here's a graph of how this works:


The Experiment function is really important.  This is a staple of TensorFlow and machine learning.  The idea here is that you don't train a single model, you train a whole class of models and then select the one that best estimates the desired output.

Here's a recap with the URL with the code that we discussed in the example:


"The core ideas behind deep learning are simple, and so should be their implementation".  With this in mind, the idea is to keep the tools modular and intuitive.  Lego blocks are a good metaphor for Machine Learning and the idea behind Keras API:


So, what is Keras API and the goals for this API? Glad you asked:

Keras API in use - in our example we're trying to determine what a man is doing in a given video.  This was very hard to do in 3-4 years ago.  But now it's very easy to solve with anyone with basic Python scripting abilities.


First step is turning a set of frames into a vector.  The vector takes into account what's happening in each frame and in what order (if we don't know order we couldn't tell if the man is packing or unpacking his car). This is important because once you've done this you can use linear algebra and LOTS of data to train the model.  So building deep learning models is conceptually similar to building with legos since they are very modular and simple.  Here's the entire set of code to turn the frames into a vector, along with conceptually how the model actually works:



Then you can use the TensorFlow Estimator and Experiment classes to train the model.  Very powerful and a big step in "Democratizing AI" (that phrase came up a bunch in the keynote).





No comments:

Post a Comment