Computing Workflows, Data Science, and such


Caffe Installation

Last week, I attempted to install yet another machine learning framework, Caffe. While it does include Python bindings, the default interface seems to be model specification via a JSON file and running from the command line.

This library is one of the more fragile installation procedures. While I tried to compile it, nothing seemed to work. That may be my Arch Linux system acting up. After the stream, I settled for using a Docker container.

Line By Line `mnist.py`

LineByLine continues in another week, this time on mnist.py, the partner to last week’s video. The catchphrase this week is “Statistically Responsible” as related to the loss function.

This worked pretty well, and I got to learn a couple new TensorFlow functions. Though my voice started to give out near the end, I’d be glad to do this again. If you have a particular tutorial or script you want me to walk through, drop me a line in email!

Line By Line `fully_connected_feed.py`

This week launched a new series, “Line By Line”. By viewer request, I walked through the excruciating details of TensorFlow’s fully_connected_feed.py script. It has a lot of little components that can trip you up if you’re not used to seeing them.

The upside of this kind of video is that it’s hard to totally screw up since it’s vetted existing code. On the flip side, I can only do this with something I know really well. In this case, I’ve done the MNIST example in my sleep, so it’s not a problem. If you’ve got other tutorials or topics you’d like exposed, let me know!

Keras RNN Success

It’s taken several weeks, but I finally got a simple RNN model working in Keras. The key was understanding that Keras wanted to work on one sequence at a time, not batch them all up. So I had to change up my training to iterate through all the sentence, doing one epoch at a time. Maybe there’s a better way, but this finally worked and gave a model that did vaguely the correct thing.

After producing a working model for this word embedding problem, I wanted to have something simpler just to get a better grip on RNNs. So, I generated some fake sinusoidal temperature data and quickly grabbed some rainfall information off the web. I was able to use this to build a model to predict the season based on daily values of these (and history via the RNN). Doing this hacky thing doesn’t work too well, but keep your eye out to if I revisit this type of data again.

Keras Release 1.0!

Since the last video, Keras officially released version 1.0, woohoo! In this video, I poked around at some of the new features and changed syntax. Most of it is pretty much the same. The big change was that “Graph” objects are now “Functional” objects. I think I preferred the old name, but I never got around to using it, so I don’t get a vote.

I also tried to get a simple RNN running again, but the data just isn’t lining up for this. I think I need to find a minimal example, with the data spelled out, to see what my problem is. I need a “DanDoesData” for RNNs :p

I think I’ve goofed off with Keras enough for now, and it’s time to move on to another topic. Several viewers have sent in suggestions, so I’ll pick one of those from a hat.

Page 10 of 16