public void TestBipolarTanh() { IActivation bipolarTanh = new BipolarTanhActivation(); foreach (Tuple <double, double> tup in bipolarTanhTestCases) { Assert.AreEqual(tup.Item2, bipolarTanh.Calc(tup.Item1), EPSILON); } }
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"); } }