title: Keras Flatten layer in Functional API?
body: <pre><code>model = Sequential()
  model.add(Flatten(input_shape=(1,) + (52,)))
  model.add(Dense(100))
  model.add(Activation('relu'))
  model.add(Dense(2))
  model.add(Activation('linear'))
  print(model.summary())
  </code></pre>
  
  <p>I want to change this keras code in sequential version to same code with functional version like the following.</p>
  
  <pre><code>input = Input(shape=(1,) + (52,))
  i = Flatten()(input)
  h = Dense(100, activation='relu')(i)
  o = Dense(2, activation='linear')(h)
  model = Model(inputs=i, outputs=o)
  model.summary()
  </code></pre>
  
  <p>But it got error </p>
  
  <pre><code>  File "C:\Users\SDS\Anaconda3\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
      return func(*args, **kwargs)
    File "C:\Users\SDS\Anaconda3\lib\site-packages\keras\engine\network.py", line 93, in __init__
      self._init_graph_network(*args, **kwargs)
    File "C:\Users\SDS\Anaconda3\lib\site-packages\keras\engine\network.py", line 237, in _init_graph_network
      self.inputs, self.outputs)
    File "C:\Users\SDS\Anaconda3\lib\site-packages\keras\engine\network.py", line 1430, in _map_graph_network
      str(layers_with_complete_input))
  ValueError: Graph disconnected: cannot obtain value for tensor Tensor("input_1:0", shape=(?, 1, 52), dtype=float32) at layer "input_1". The following previous layers were accessed without issue: []
  </code></pre>