Tensorflow: method to save and restore TensorFlowEstimator()
<p>How to save and load this object (<code>regressor</code>)? </p>

<pre><code>from tensorflow.contrib import learn
regressor = learn.TensorFlowEstimator()
</code></pre>

<p>I could not use tensorflow's default Saver() to save it.</p>

<p>How to do incremental learning with this model? I am confused about <code>continue_training</code> parameter in its constructor. It says you can call fit again and again with new data. And at the same time it provides <code>partial_fit()</code>. Please help me understand ? </p>

<p>According to this <a href="https://github.com/tensorflow/skflow#saving--restoring-models" rel="nofollow">TF tutorial</a>, the following should work: </p>

<p>for saving:</p>

<pre><code>regressor.save('/tmp/tf_examples/my_model_1/')
</code></pre>

<p>for restoring:</p>

<pre><code>new_regressor = TensorFlowEstimator.restore('/tmp/tf_examples/my_model_2')
</code></pre>

<hr>

<p>For incremental training: Please refer the following details. They've given pretty much good explanation.</p>

<p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.TensorFlowEstimator.md#tfcontriblearntensorflowestimator__init__model_fn-n_classes-batch_size32-steps200-optimizeradagrad-learning_rate01-clip_gradients50-class_weightnone-continue_trainingfalse-confignone-verbose1-tensorflowestimatorinit" rel="nofollow">continue_training</a> - set this to <code>True</code>, the model initialized once and it will be continually trained on every call of fit.</p>

<p><a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.TensorFlowEstimator.md#tfcontriblearntensorflowestimatorpartial_fitx-y-tensorflowestimatorpartial_fit" rel="nofollow">partial_fit</a> - Incremental fit on a batch of samples</p>

python python-3.x machine-learning tensorflow lstm