title: Keras weight file load exception: loading 2 layers into a model with 0 layers
body: <p>Exception happened when I add dropout to the input layer.</p>
  
  <p>The exception was mentioned in other threads as well related to another issues and most common suggested solution is to downgrade the Keras version. Is there a workaround for this exception?</p>
  
  <pre><code>def baseline_model() :
      model = Sequential()
      model.add(Dropout(0.35)) #THIS LINE CAUSES THE EXCEPTION
      model.add(Dense(200, input_dim=1200, kernel_initializer='normal', activation='relu'))
      model.add(Dropout(0.8))
      rms = RMSprop(lr = 0.00050)
      model.add(Dense(1, kernel_initializer='normal', activation='sigmoid'))
      model.compile(loss='binary_crossentropy', optimizer=rms, metrics=['accuracy'])
      return model
  </code></pre>
  
  <p>Model throws the following exception during weight file loading:</p>
  
  <pre><code>ValueError: You are trying to load a weight file containing 2 layers into a model with 0 layers.
  </code></pre>