Simple example of machine learning in TensorFlow
1–10 of 49 posts
Re: Simple example of machine learning in TensorFlow
#2For your next tutorial, may I suggest: 1) a list of do's and don'ts for constructing a savable/restorable model, and 2) a wee bit of example code.
Of course, now that I have discovered Keras I'm moving away from low-level direct TensorFlow. But I suspect I'm not the only one a bit foggy about the whole save/restore work flow.
Re: Simple example of machine learning in TensorFlow
#3Re: Simple example of machine learning in TensorFlow
#4I 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…
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 variables -- do you want to save model variables + the moving averages ... or just the averages. But then when you're loading you'll have to "shadow" the moving averages to the real variables that actually run in your model.
Good news though, most of the scaffolding code you can write once and re-use it over and over again.
Re: Simple example of machine learning in TensorFlow
#5I 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…
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…
Re: Simple example of machine learning in TensorFlow
#6I 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…
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…
Models with a few million parameters result in a file around ~50MB, which is still reasonable for modern production use cases.
Re: Simple example of machine learning in TensorFlow
#7This blog series was also helpful on a conceptual level: https://medium.com/emergent-future/simple-reinforcement-lear...
Re: Simple example of machine learning in TensorFlow
#8LOL :) (Side-note: 8 million is still not big data)
Re: Simple example of machine learning in TensorFlow
#9I wish there were more TensorFlow examples written in Go. I made the mistake of checking out TensorFlow as my first intro to ML and it flew about 10 miles over my head. Slowly learning now, but most of the documentation and tutorials are written in Python. This blog series was also helpful on a conceptual level: https://medium.com/emergent-future/simple-reinforcement-lear...
Re: Simple example of machine learning in TensorFlow
#10I currently have a small pet project where I think some simple ML would be cool but I don't know where to start so these things are great.
Basically my use case is that I have a bunch of 64x64 images (16 colors) which I manually label as "good", "neutral" or "bad". I want to input this dataset and train the network to categorize new 64x64 images of the same type.
The closest I've found is this: https://gist.github.com/sono-bfio/89a91da65a12175fb1169240cd...
But it's still too hard to understand exactly how I can create my own dataset and how to set it up efficiently (the example is using 32x32 but I also want to factor in that it's only 16 colors; will that give it some performance advantages?).