Exemplo n.º 1
0
        public void TestBipolarTanh()
        {
            IActivation bipolarTanh = new BipolarTanhActivation();

            foreach (Tuple <double, double> tup in bipolarTanhTestCases)
            {
                Assert.AreEqual(tup.Item2, bipolarTanh.Calc(tup.Item1), EPSILON);
            }
        }
Exemplo n.º 2
0
 private void ParseActivationFunc(string str)
 {
     if (str == "U")
     {
         Activation = new UnipolarSigmoidActivation();
     }
     else if (str == "B")
     {
         Activation = new BipolarTanhActivation();
     }
     else
     {
         throw new ArgumentException("Unknown activation function specification");
     }
 }