Example #1
0
        // Exponential Linear Unit
        public override double Activate(double x, ActivationParameters Params)
        {
            ELUParams temp = (ELUParams)Params;

            return((x < 0) ? temp.Alpha * (Math.Exp(x) - 1) : x);
        }
Example #2
0
        public override double Derivate(double x, ActivationParameters Params)
        {
            ELUParams temp = (ELUParams)Params;

            return((x < 0) ? Activate(x, Params) + temp.Alpha : 1);
        }