title: tensorflow: how create an const tensor the same shape as a placeholder
body: <p>I have a place holder for input:</p>
  
  <pre><code>Y = tf.placeholder(dtype=tf.float32, shape=(None, n_outputs))
  </code></pre>
  
  <p>
  Now I want to create a constant the same shape the Y:</p>
  
  <pre><code>w = Y.get_shape()
  zero = tf.constant(np.zeros(w), dtype=tf.float32)
  </code></pre>
  
  
  
  
  
  <p>Error return:</p>
  
  <pre><code>__index__ returned non-int (type NoneType)
  </code></pre>