This class implements a layer that randomly sets some elements of a single input to 0
.
If the blob BatchLength
is greater than 1
, all elements along the same BatchLength
coordinate will use the same mask.
When the network is not being trained (for example, you are doing a test run), the dropout will not happen.
void SetDropoutRate( float value );
Sets the proportion of elements that will be set to 0
.
void SetSpatial( bool value );
Turns on and off the spatial
dropout mode. When this mode is on, the whole contents of a channel will be filled with zeros, instead of elements one by one. It may be useful for convolutional networks.
By default, spatial mode is off.
void SetBatchwise( bool value );
Turns on and off the batchwise
dropout mode. When this mode is on, the same mask will be used along the same BatchWidth
coordinate. The mode may be useful when the input size is large.
By default, batchwise mode is off.
The layer has no trainable parameters.
The single input accepts a data blob of arbitrary size.
The single output returns a blob of the same size with some of the elements set to 0
. Note that this will happen only during training; when you are running the network without training no elements are dropped out.