title: unable to build model as backend.squeeze has no layer
body: <p>I am trying to build a model where I have a tensor that has to be squeezed and then fed into an LSTM.</p>
  
  <p>The model does not compile as the squeezed tensor does not have a layer attribute.</p>
  
  <pre><code>Using TensorFlow backend.
  Traceback (most recent call last):
    File "C:/workspace/keras_test/src/testing.py", line 10, in &lt;module&gt;
      model = Model(inputs=model_in, outputs=output)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
      return func(*args, **kwargs)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 93, in __init__
      self._init_graph_network(*args, **kwargs)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 237, in _init_graph_network
      self.inputs, self.outputs)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 1353, in _map_graph_network
      tensor_index=tensor_index)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 1340, in build_map
      node_index, tensor_index)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 1340, in build_map
      node_index, tensor_index)
    File "E:\ProgramData\Miniconda3\envs\py37\lib\site-packages\keras\engine\network.py", line 1312, in build_map
      node = layer._inbound_nodes[node_index]
  AttributeError: 'NoneType' object has no attribute '_inbound_nodes'
  </code></pre>
  
  <p>For a minimum example see:</p>
  
  <pre><code>from keras import Input, backend, Model
  from keras.layers import LSTM, Dense
  
  input_shape = (128, 1, 1)
  model_in = Input(tensor=Input(input_shape), shape=input_shape)
  squeezed = backend.squeeze(model_in, 2)
  hidden1 = LSTM(10)(squeezed)
  output = Dense(1, activation='sigmoid')(hidden1)
  
  model = Model(inputs=model_in, outputs=output)
  model.summary()
  </code></pre>
  
  <p>How can I remove one dimension of <code>model_in</code> without losing the layer information?</p>