# 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 ratio and instead sets dropping element to their previous variable. In testing mode , it does nothing and just returns x.

Warning

train argument is not supported anymore since v2. Instead, use chainer.using_config('train', train). See chainer.using_config().

Parameters: h (Variable) – Previous variable. x (Variable) – Input variable. ratio (float) – Zoneout ratio. Output variable. Variable