title: Custom reshaping layer return Tensor with shape (?,?,?)
body: <p>I need a layer that reshapes a 4D Tensor from a Convolutional layer with shape (None, 3, 3, 2048) to a 3D Tensor with shape (None, 9, 2048) to be fed into an LSTM, where 9 is the size of the timesteps dimension.</p>
  
  <p>When I use the layer itself it works, but when I use it in a Sequential model, the next layer gets (?,?,?) as <code>input_shape</code> from the output of my custom layer.</p>
  
  <p>Below you can find my code:</p>
  
  <pre class="lang-py prettyprint-override"><code>class Conv2LSTM(Layer):
  
      '''The :class:`Conv2LSTM` is a custom layer that reshapes the input tensor collapsing the width and height dimensions to a single dimension that represents the sequence accepted by the LSTM.
      '''
  
      def __init__(self, **kwargs):
          super(Conv2LSTM, self).__init__(**kwargs)
  
      def build(self, input_shape):
          self.input_spec = [InputSpec(shape=input_shape)]
          super(Conv2LSTM, self).build(input_shape)
  
      def call(self, x, mask=None):
  
          '''Overrides the :class:`keras.engine.topology.Layers` method. It collapses the second and third dimension of the tensor into a single dimension.
  
          :param x: input tensor
          :param mask: tensor mask
          :return: re-ordered tensor
          '''
  
          return K.reshape(x, (K.shape(x)[0],) + (K.shape(x)[1]*K.shape(x)[2], K.shape(x)[3]))
  
      def get_config(self):
          base_config = super(Conv2LSTM, self).get_config()
          return dict(list(base_config.items()))
  
      def compute_output_shape(self, input_shape):
          return (input_shape[0],) + (input_shape[1]*input_shape[2], input_shape[3])
  </code></pre>
  
  <p>How is it possible that if I print the shape inside the layer it is correct, if I create a model with that single layer it works, but combined with a successive layer, it returns a NoneType shape?</p>