Exemplo n.º 1
0
        public virtual Tensor EluForward(float Alpha, Tensor x)
        {
            var keepElements     = x > 0;
            var keepElements_Exp = x < 0;
            var d = Alpha * (K.Exp(K.Mul(x, keepElements_Exp)) - 1);

            return(K.Mul(x, keepElements) + d);
        }
Exemplo n.º 2
0
 public static Tensor operator *(float a, Tensor b)
 {
     return(K.Mul(a, b));
 }