
Hello, Tensorflow - lobsterdog
https://www.oreilly.com/learning/hello-tensorflow
======
ajschumacher
Wow! I was going to post this but here it is already! I wrote (with a lot of
help) the article there. I also jotted down some notes on the process of
writing it with O'Reilly in case anybody's interested in that side of things:
[http://planspace.org/20160619-writing_with_oreilly/](http://planspace.org/20160619-writing_with_oreilly/)

~~~
rspeer
Just a CSS critique: could you add "monospace" to the end of your list of
monospaced fonts?

I have perfectly good monospaced fonts on this computer, but none of them are
Consolas, Menlo, Monaco, or Lucida Console, so I end up with a default
proportional serif font.

~~~
weinzierl
This might seem like an innocent change but it really is another HTML/CSS
browser hell hole. If I remember correctly it was Jeff Atwood or jzy who
taught me this lesson at a time when Stackoverflow was just out of Beta:

If the keyword _monospace_ is somewhere in your font stack _some_ browsers use
13px as default font size instead of the usual 16px. The workaround used to be
to use _both_ , serif and monospace, in your font stack. This used to work
some time ago, I don't know if it still does with contemporary browsers.

~~~
ajschumacher
O'Reilly tells me that this issue has been resolved as of last Friday. Does it
seem better now?

------
tromobne8vb
As I've been reading about tensorflow lately I feel like I'm missing something
regarding distributed processing. How can Tensorflow 'scale up' easily if you
are outside of Google? We have big datasets that I want to run learning on but
it seems awkward to do with tensorflow. We're big enough that the team
managing our cluster is separate than development and it is a huge pain if we
need them to go install tools on each node. Even with Spark support it seems
like the tensorflow python libraries need to be set up on each machine in the
cluster ahead of time.

Am I missing something?

~~~
jamesblonde
No, you're not. Google did this with their build engine (Blaze, internally -
Bazel is the open-source API, lacking a distributed build platform). Google
are doing this with Apache Beam (the API to Google dataflow) - releasing an
API for local testing but not releasing the distributed engine.

If you have your data in a Hadoop cluster and are doing image recognition,
Yahoo's Cafe on Spark is the only truly distributed engine out there. It uses
MPI to share model state between executors.

~~~
agibsonccc
Keep in mind there's different kinds of parallelism though. If you mean model
parallel, a lot of shops are doing that via RDMA as well as MPI. It depends on
how you handle state though.

There's also data parallelism with parameter averaging which we've been doing
in deeplearning4j for the last few years. We also support ALOT more than just
images. We have the ETL pipelines (kafka etc) to go with it. Watch for a blog
post from us on parallel for all (nvidia's blog) where we explain some of
this.

I gave a framework agnostic view of the concepts you should consider when
looking at distributed deep learning as well:

[http://www.slideshare.net/agibsonccc/brief-introduction-
to-d...](http://www.slideshare.net/agibsonccc/brief-introduction-to-
distributed-deep-learning)

------
50CNT

        TensorFlow is admirably easier to install than some other frameworks
    

I thought most frameworks are fairly easy to install in python, usually with a
single call to pip. NLTK takes one "pip install nltk" and then "python",
"import nltk", "nltk.download()" to download all the corpuses and
miscellaneous data. Installing tensorflow seems complicated compared to that.

    
    
        # Ubuntu/Linux 64-bit, CPU only:
        $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
    
        # Ubuntu/Linux 64-bit, GPU enabled. Requires CUDA toolkit 7.5 and CuDNN v4.  For
        # other versions, see "Install from sources" below.
        $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl
    

Not that either are particularly complicated, but saying other frameworks
(assuming they're referring to python frameworks) are "a lot harder to
install" seems disingenuous.

That said, I haven't played around with AI frameworks too much, so I might
just be missing a real stinker.

~~~
JPKab
Compared to other frameworks which allow for deep learning, it's much easier
to install.

~~~
50CNT
I see. The article was a bit vague for me in what it means by frameworks (does
NLTK count? Django? DL frameworks in other languages?), and since I don't know
the area too well, that struck out to me as odd.

It honestly looks like pretty cool stuff, looking forward to having time to
play around with it some day.

~~~
ajschumacher
Thanks! I didn't want to name names in the comparison to other frameworks, but
I was thinking mostly of Caffe, which doesn't have any install path as simple
as just a `pip install`. Other DL frameworks would be things like torch,
theano, etc.

------
anilshanbhag
I like the clarity of thought and structure of the article. I have used
Tensorflow and had to explain it to a friend. So many times, I end up assuming
things which are obvious to me but not to someone getting started. As said in
the article, Tensorflow stands out for the ease of use and is to the best of
my knowledge first distributed learning framework. Theano, Torch et al are
faster but do not come with goodies like Tensorboard.

~~~
gradys
There are different notions of "fast" as well. Theano might be faster on a
single GPU (not actually sure if this is still true), but TensorFlow can be
distributed to multiple GPUs in one machine or even across several machines.
Several groups have reported speedups that are near-linear in the number of
GPUs you distribute across. This can make TensorFlow orders of magnitude
faster than Theano.

------
ajschumacher
I presented a version of this at a meetup! Presentation and supporting
materials here:
[http://planspace.org/20160629-presenting_hello_tensorflow/](http://planspace.org/20160629-presenting_hello_tensorflow/)

------
farresito
I love this short tutorials that give you an introduction to anything in an
hour. They help you get interested in stuff you wouldn't have gotten
interested in otherwise.

------
tedmiston
> For more on basic techniques and coding your own machine learning
> algorithms, check out our O'Reilly Learning Path, "Machine Learning."

This learning path is also available free for Safari Books Online subscribers.

[https://www.safaribooksonline.com/library/view/learning-
path...](https://www.safaribooksonline.com/library/view/learning-path-
machine/9781491958155/)

------
bduerst
This is fantastic - thank you for doing this. When paired with the browser
tool it makes a lot more sense:
[http://playground.tensorflow.org/](http://playground.tensorflow.org/)

Is this planned to be released as an intro in a book about tensorflow?

~~~
ajschumacher
Thanks! There aren't any firm plans, but we are thinking about what might make
sense.

------
Fenntrek
Wonder when we will see the day when an O'Reilly book is written by AI.

Could be a nice little loop if part of the creators of the AI that would
accomplish this learned part of their craft from O'Reilly books.

------
JPKab
Hey Aaron! Hello from one of the people you taught in your first GADS class in
DC.

~~~
ajschumacher
Hi! Good to hear from you here! :)

