title: Keras - Use tensor shape for K.zeros shape
body: <p>I am using custom <code>softmax</code> function. I am trying to use shape of tensor <code>x</code> as an element of shape of new tensor of zeros. It can not be done since it is not int.</p>
  
  <pre><code>def custom_softmax(x):
      sh = K.shape(x)
      ...      
      xc = K.zeros((sh[0] * 16 * 16, 1))
      ...
  </code></pre>
  
  <p>The next option I tried is with evaluation of tensor which should work but not. </p>
  
  <pre><code>def custom_softmax(x):
      sh = K.shape(x)
      sess = K.get_session()
      ...      
      xc = K.zeros((sh[0].eval(session=sess) * 16 * 16, 1))
      ...
  </code></pre>
  
  <p>It gives me error </p>
  
  <pre><code>tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'image_part_input' with dtype float
  </code></pre>
  
  <p>which is completely not understandable since it reference the main network input to be incorrect. Network works when I hardcode values of shape in <code>K.zeros</code>. Is there any other solution?</p>