title: Keras: Droupout with functional api in mlp
body: <p>i am using du functional api from keras and would like to add a dropout to my multi layer perceptron.</p>
  <p>do i have to put the dropout before or after the layer and do i have to connect the next layer to the dropout or to the previous layer?</p>
  <pre><code>hidden_Layer_2 = Dense(152,activation='relu')(hidden_Layer_1)
  dropout_2 = Dropout(0.4)(hidden_Layer_2)
  hidden_Layer_3 = Dense(152, activation='relu')(hidden_Layer_2)
  </code></pre>
  <p>or</p>
  <pre><code>hidden_Layer_2 = Dense(152,activation='relu')(hidden_Layer_1)
  dropout_2 = Dropout(0.4)(hidden_Layer_2)
  hidden_Layer_3 = Dense(152, activation='relu')(dropout_2 )
  </code></pre>