title: Python Tensorflow NoneType is not Iterable
body: <p>Full code is <a href="https://gist.github.com/xmaayy/367259ca33f05fa5d7a12e08c2c1c11e" rel="noreferrer">here</a></p>
  
  <p>The error:</p>
  
  <pre><code>    ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-6-e6c5369957bc&gt; in &lt;module&gt;()
       55 print(feed_dict)
       56 _ , loss_val = sess.run(tr_op, 
  ---&gt; 57                         feed_dict=feed_dict)
       58 print('Loss of the current batch is {}'.format(loss_val))
  
  TypeError: 'NoneType' object is not iterable
  </code></pre>
  
  <p>The following code is run before that call is executed:</p>
  
  <pre><code>print(type(tr_op))
  print(type(feed_dict))
  try:
      some_object_iterator = iter(feed_dict)
  except TypeError as te:
      print (feed_dict, 'is not iterable')
  print(feed_dict)
  </code></pre>
  
  <p>which yields the output:</p>
  
  <pre><code>&lt;class 'tensorflow.python.framework.ops.Operation'&gt;
  &lt;class 'dict'&gt;
  {&lt;tf.Tensor 'img_data:0' shape=(?, 64, 64, 3) dtype=float32&gt;: array([[[[0.3019608 , 0.23921569, 0.58431375],
           [0.30588236, 0.23921569, 0.61960787],
           [0.30980393, 0.24705882, 0.63529414],
           ...,
  </code></pre>
  
  <p>So the object that should be iterable is clearly iterable because it isnt raising the exception when I try to make an iterator out of it, and both objects both have clearly defined types. This error is not in the TensorFlow file for session, and I dont know where it was raised because there is no trace.</p>
  
  <p>Thanks for any help</p>