News for hackers. Stuff that matters.
Re:Simple example of machine learning in TensorFlow by pmalynin on Monday March 13, 2017 @01:05PM (#13859804)
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 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 by minimaxir on Monday March 13, 2017 @01:17PM (#13859942)
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.

Re:Simple example of machine learning in TensorFlow by glial on Monday March 13, 2017 @09:24PM (#13864176)
Keras makes using deep learning for simple-ish use cases sooooo easy.
Re:Simple example of machine learning in TensorFlow by matheweis on Monday March 13, 2017 @11:02PM (#13864621)
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 by jostmey on Monday March 13, 2017 @01:14PM (#13859906)
+1
Re:Simple example of machine learning in TensorFlow by jostmey on Monday March 13, 2017 @03:18PM (#13861351)
I would put together a tutorial on how models are saved and restored if I understood it, which is to say it still confuses me