title: How can I run a loop with a tensor as its range? (in tensorflow)
body: <p>I want to have a for loop that the number of its iterations is depend on a tensor value. For example:</p>
  
  <pre><code>for i in tf.range(input_placeholder[1,1]):
    # do something
  </code></pre>
  
  <p>However I get the following error:</p>
  
  <p><strong>"TypeError: 'Tensor' object is not iterable"</strong></p>
  
  <p>What should I do?</p>