Is it possible to use dropout at train and test phase in Keras?
Like described here: https://github.com/soumith/ganhacks#17-use-dropouts-in-g-in-both-train-and-test-phase
Is it possible to use dropout at train and test phase in Keras?
Like described here: https://github.com/soumith/ganhacks#17-use-dropouts-in-g-in-both-train-and-test-phase
You don't want to use Dropout in Test phase.
Dropout is a technique used to force neurons to be more independent each other: each neuron will be deactivate with the probability that you set, but only in the training phase.
In the Test phase you keep all the neurons working.
More details here and here
Sure, you can set
training
argument toTrue
when calling theDropout
layer. In this way, dropout would be applied in both training and test phases: