title: Keras Reshape layer adding an extra dimension?
body: <p>The <code>Reshape</code> layer is not working how I would expect. In the example below, I think the last line should return a tensor object of shape <code>[5,1]</code>. However an error is thrown, stating that a shape <code>[5]</code> tensor cannot be reshaped into a size <code>[5,5,1]</code> tensor.</p>
  
  <pre><code>&gt;&gt;&gt; from keras.layers import Reshape
  &gt;&gt;&gt; from keras import backend as K
  &gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; x = K.constant(np.array([1,2,3,4,5]))
  &gt;&gt;&gt; K.eval(x)
  array([1., 2., 3., 4., 5.], dtype=float32)
  &gt;&gt;&gt; Reshape(target_shape=(5,1))(x)
  ...
  ValueError: Cannot reshape a tensor with 5 elements to
  shape [5,5,1] (25 elements) for 'reshape_3/Reshape' (op: 
  'Reshape') with input shapes: [5], [3] and with input 
  tensors computed as partial shapes: input[1] = [5,5,1].
  </code></pre>
  
  <p>Can someone kindly explain how the Reshape layer works (i.e. why it's adding the extra dim) and how to do the process of reshaping a vector into a matrix?</p>
  
  <p>Thanks</p>