title: Could someone explain me the basic tutorial of TensorFlow?
body: <p>I am trying to get through the second section of the first tutorial of TensorFlow:
  <a href="https://www.tensorflow.org/get_started/get_started" rel="nofollow noreferrer">https://www.tensorflow.org/get_started/get_started</a></p>
  
  <p>"Basic Usage":</p>
  
  <pre><code>import tensorflow as tf
  # NumPy is often used to load, manipulate and preprocess data.
  import numpy as np
  
  # Declare list of features. We only have one real-valued feature. There are many
  # other types of columns that are more complicated and useful.
  features = [tf.contrib.layers.real_valued_column("x", dimension=1)]
  
  # An estimator is the front end to invoke training (fitting) and evaluation
  # (inference). There are many predefined types like linear regression,
  # logistic regression, linear classification, logistic classification, and
  # many neural network classifiers and regressors. The following code
  # provides an estimator that does linear regression.
  estimator = tf.contrib.learn.LinearRegressor(feature_columns=features)
  
  # TensorFlow provides many helper methods to read and set up data sets.
  # Here we use two data sets: one for training and one for evaluation
  # We have to tell the function how many batches
  # of data (num_epochs) we want and how big each batch should be.
  x_train = np.array([1., 2., 3., 4.])
  y_train = np.array([0., -1., -2., -3.])
  x_eval = np.array([2., 5., 8., 1.])
  y_eval = np.array([-1.01, -4.1, -7, 0.])
  input_fn = tf.contrib.learn.io.numpy_input_fn({"x":x_train}, y_train,
                                                batch_size=4,
                                                num_epochs=1000)
  eval_input_fn = tf.contrib.learn.io.numpy_input_fn(
      {"x":x_eval}, y_eval, batch_size=4, num_epochs=1000)
  
  # We can invoke 1000 training steps by invoking the  method and passing the
  # training data set.
  estimator.fit(input_fn=input_fn, steps=1000)
  
  # Here we evaluate how well our model did.
  train_loss = estimator.evaluate(input_fn=input_fn)
  eval_loss = estimator.evaluate(input_fn=eval_input_fn)
  print("train loss: %r"% train_loss)
  print("eval loss: %r"% eval_loss)
  </code></pre>
  
  <p>Could someone explain me, where is the computational graph hidden in this code?
  I don't see any calls to <code>tf.Graph()</code> or <code>tf.Session()</code>.</p>
  
  <p>What is the <code>features</code> variable used for? The data seem to never get in it, since the data provider is 'input_fn'.
  How can I see the actual computational graph for the session and the graph?</p>
  
  <p>Why are there two places where I set the number of epochs? (<code>estimator.fit</code> and <code>numpy_input_fn</code>)</p>
  
  <p>What if I have two different estimators with <code>estimator1.fit(..., steps=20)</code> and <code>estimator2.fit(..., steps=50)</code>?
  Do I need to set <code>num_epochs=70</code>? Or <code>num_epochs=max(20,50)</code>?
  How can the <code>input_fn</code> control the number of threads, if it is called from <code>fit</code>, not vice versa?</p>