title: How to save a trained model (Estimator) and Load it back to test it with data in Tensorflow?
body: <p>I have this snippet, for my model </p>
  
  <pre><code>import pandas as pd
  import tensorflow as tf
  from tensorflow.contrib import learn
  from tensorflow.contrib.learn.python import SKCompat
  #Assume my dataset is using X['train'] as input and y['train'] as output
  
  regressor = SKCompat(learn.Estimator(model_fn=lstm_model(TIMESTEPS, RNN_LAYERS, DENSE_LAYERS),model_dir=LOG_DIR))
  validation_monitor = learn.monitors.ValidationMonitor(X['val'], y['val'], every_n_steps=PRINT_STEPS, early_stopping_rounds=1000)
  regressor.fit(X['train'], y['train'],
                monitors=[validation_monitor],
                batch_size=BATCH_SIZE,
                steps=TRAINING_STEPS)
  
  #After training this model I want to save it in a folder, so I can use the trained model for implementing in my algorithm to predict the output
  #What is the correct format to use here to save my model in a folder called 'saved_model'
  regressor.export_savedmodel('/saved_model/')
  
  #I want to import it later in some other code, How can I import it?
  #is there any function like import model from file?
  </code></pre>
  
  <p>How can I save this estimator? I tried finding some examples for tf.contrib.learn.Estimator.export_savedmodel, I did not have a success? Help Appreciated.</p>