Wraps a given neuron type and implements dropout for it. More...
#include <shark/Models/Neurons.h>
Public Member Functions | |
DropoutNeuron () | |
template<class T > | |
T | function (T x) const |
template<class T > | |
T | functionDerivative (T y) const |
void | setProbability (double probability) |
void | setStochastic (bool stochastic) |
Wraps a given neuron type and implements dropout for it.
The function works by setting the output randomly to 0 with a 50% chance. The function assumes for the wrapped neuron type that the derivative for all points for which the output is 0, is 0. This is true for the LogisticNeuron, FastSigmoidNeuron and RectifierNeuron.
|
inline |
|
inline |
Definition at line 196 of file Neurons.h.
References shark::random::coinToss(), and shark::random::globalRng.
|
inline |
|
inline |
|
inline |