chainer.functions.zoneout¶
-
chainer.functions.zoneout(h, x, ratio=.5)[source]¶ Drops elements of input variable and sets to previous variable randomly.
This function drops input elements randomly with probability
ratioand instead sets dropping element to their previous variable. In testing mode , it does nothing and just returnsx.Warning
trainargument is not supported anymore since v2. Instead, usechainer.using_config('train', train). Seechainer.using_config().Parameters: - h (
Variableor N-dimensional array) – Previous variable. - x (
Variableor N-dimensional array) – Input variable. - ratio (float) – Zoneout ratio.
Returns: Output variable.
Return type: See the paper: Zoneout: Regularizing RNNs by Randomly Preserving Hidden Activations.
- h (