public void ActivateProducesCorrectResultNegativeValue(double activationValue, double expectedResult) { var activationFunction = TanHActivationFunction.Create(); var activationResult = activationFunction.Activate(activationValue); DoubleAssertionHelpers.AssertWithPrecision(expectedResult, activationResult, 10); }
public void DerviativeProducesCorrectResultNegativeValue(double inputValue, double expectedResult) { var activationFunction = TanHActivationFunction.Create(); var derivativeResult = activationFunction.Derivative(inputValue); DoubleAssertionHelpers.AssertWithPrecision(expectedResult, derivativeResult, 10); }
public void Assert(double actualItem) { DoubleAssertionHelpers.AssertWithPrecision( expectedResult, actualItem, precisionToAssertTo); }