title: Tensorflow classifier.export_savedmodel (Beginner)
body: <p>I know about the "Serving a Tensorflow Model" page</p>
  
  <p><a href="https://www.tensorflow.org/serving/serving_basic" rel="noreferrer">https://www.tensorflow.org/serving/serving_basic</a></p>
  
  <p>but those functions assume you're using tf.Session() which the DNNClassifier tutorial does not... I then looked at the api doc for DNNClassifier and it has an export_savedmodel function (the export function is deprecated) and it seems simple enough but I am getting a "'NoneType' object is not iterable" error... which is suppose to mean I'm passing in an empty variable but I'm unsure what I need to change... I've essentially copied and pasted the code from the get_started/tflearn page on tensorflow.org but then added </p>
  
  <pre><code>  directoryName = "temp"
  
    def serving_input_fn():
      print("asdf")
  
    classifier.export_savedmodel(
      directoryName,
      serving_input_fn
    )
  </code></pre>
  
  <p>just after the classifier.fit function call... the other parameters for export_savedmodel are optional I believe... any ideas?</p>
  
  <p>Tutorial with Code:
  <a href="https://www.tensorflow.org/get_started/tflearn#construct_a_deep_neural_network_classifier" rel="noreferrer">https://www.tensorflow.org/get_started/tflearn#construct_a_deep_neural_network_classifier</a></p>
  
  <p>API Doc for export_savedmodel
  <a href="https://www.tensorflow.org/api_docs/python/tf/contrib/learn/DNNClassifier#export_savedmodel" rel="noreferrer">https://www.tensorflow.org/api_docs/python/tf/contrib/learn/DNNClassifier#export_savedmodel</a></p>