Live data from Hacker News

Simple example of machine learning in TensorFlow

github.com

41–49 of 49 posts

Re: Simple example of machine learning in TensorFlow

#41
post #4

Earlier quoted context omitted.

As a person that uses TensorFlow for his day job: I find that saving and restoring are of the weirder things with TensorFlow, you can either go all out an decide to save out all the variables, or only the ones needed for the model. You usually don't want to save out gradients (which are also variables) since they take up a bunch of space and aren't actually that useful to restore. Now on the other, what are model var…

In Keras, it's just a simple model.save() [to a hdf5 file] and load_model(). This includes both the weights and the architecture. Models with a few million parameters result in a file around ~50MB, which is still reasonable for modern production use cases.

Keras makes using deep learning for simple-ish use cases sooooo easy.

Re: Simple example of machine learning in TensorFlow

#42
post #2

I like these kind of "Hello, world!" examples for TensorFlow. As a TensorFlow beginner, I need all the references I can get. Here is what I need right now: "Hello, we meet again!". I can build a neural net model, and train (albeit, often badly) a model, but saving and restoring the trained weights so that I can run the model again is giving me fits. I am clearly missing something fundamental about how to restore a Te…

A lot of the best practices for initializing/saving/restoring/etc. are handled automatically if you wrap your model in an Estimator[1] using a model_fn. It also enforces a "clean" model specification (in a new Graph) and decoupling of the input pipeline from the model.

However, Estimators are not in TensorFlow core, which means the API isn't fixed quite yet.

[1] https://www.tensorflow.org/extend/estimators

Re: Simple example of machine learning in TensorFlow

#43
post #41

Earlier quoted context omitted.

In Keras, it's just a simple model.save() [to a hdf5 file] and load_model(). This includes both the weights and the architecture. Models with a few million parameters result in a file around ~50MB, which is still reasonable for modern production use cases.

Keras makes using deep learning for simple-ish use cases sooooo easy.

I second this - I'm really excited about Keras being integrated into the core of Tensorflow (other than the chance it might lose the Torch compatibility).

Re: Simple example of machine learning in TensorFlow

#44
post #21
post #8

>>> You are one buzzword away from being a professional. Instead of fitting a line to just eight datapoints, we will now fit a line to 8-million datapoints. Welcome to big data. LOL :) (Side-note: 8 million is still not big data)

Big Data is a reference to complexity of the data & underlying system that data represents, NOT the number of datapoints. lol

Big data is really just a buzzword that no one knows what it really means, because everyone's definition is different

lol

Re: Simple example of machine learning in TensorFlow

#45
post #21

Earlier quoted context omitted.

Big Data is a reference to complexity of the data & underlying system that data represents, NOT the number of datapoints. lol

Big data is really just a buzzword that no one knows what it really means, because everyone's definition is different lol

I always think in terms of Munchkin: "any data that is not Big is small"

Re: Simple example of machine learning in TensorFlow

#46

So I'm still wrapping my head around some of the math (I haven't had a math class in a handful of years)... I get the output of the model (y_model = m*xs[i]+b), it's the y = mx + b where we know x (from the dataset) and have y be a variable. The error is where I start to lose it, so I get the idea of the first part (ys[i]-y_model). It's basically the difference between the actual y value (from the dataset). I get tha…

I don't think there is much to gain from this tutorial, then again it doesn't pretend to offer you much either. For example in the code you are discussing, defining a model as variables and operations, instead of as a function, was confusing to me. Probably Tensorflow overloads the operations, but normally when you read "y = mx + b" you expect y to be computed directly and not to be stored as a model. "f = lambda m, x, b: m x + b" seems much more clear to me.

Re: Simple example of machine learning in TensorFlow

#47
What is the meaning of the "?bare" query string in the url? I googled around for the meaning of query strings on the github site but only found rnandom repos on github (not sure how to narrow the search). The first time I tried removing it I saw another folder named "to_do", but this is gone now so it might give a version which is cached for longer somehow?

Re: Simple example of machine learning in TensorFlow

#48

"Bare bottom"? I'm not clicking on this.

Downvoted! The title might have changed now, but the original one was completely indecipherable. As far as I could tell it was genuinely some sort of image recognition algorithm for naked buttocks.

Re: Simple example of machine learning in TensorFlow

#49

What is the meaning of the "?bare" query string in the url? I googled around for the meaning of query strings on the github site but only found rnandom repos on github (not sure how to narrow the search). The first time I tried removing it I saw another folder named "to_do", but this is gone now so it might give a version which is cached for longer somehow?

OK, found out what a bare repository means and pretty sure that's what it refers to. Still can't find any documentation for the query string parameter and don't know how that makes sense for github's repository view page.
Post reply on HN