I am using dropout in neural network model in keras. Little bit code is like
model.add(Dropout(0.5)) model.add(Dense(classes))
For testing,
You can change the dropout in a trained model (with dropout layers):
f = K.function([model.layers[0].input, K.learning_phase()], [model.layers[-1].output])
In this way you don't have to train again the model!!!