예제 #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);
            }
        }
예제 #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");
     }
 }