from the documentation located here:
The Dropout layer randomly sets input units to 0 with a frequency of rate at each step during training time, which helps prevent overfitting. Inputs not set to 0 are scaled up by 1/(1 - rate) such that the sum over all inputs is unchanged.
Note that the Dropout layer only applies when training is set to True
such that no values are dropped during inference.
When using model.fit, training will be appropriately set to True
automatically, and in other contexts, you can set the
kwarg explicitly to True when calling the layer.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…