28 std::cout <<
"Testing Activation Functions:" << std::endl;
34 error = testIdentity<TCpu<Scalar_t>>(10);
35 std::cout <<
"Testing identity activation: ";
36 std::cout <<
"maximum relative error = " << error << std::endl;
40 error = testIdentityDerivative<TCpu<Scalar_t>>(10);
41 std::cout <<
"Testing identity activation derivative: ";
42 std::cout <<
"maximum relative error = " << error << std::endl;
48 error = testRelu<TCpu<Scalar_t>>(10);
49 std::cout <<
"Testing ReLU activation: ";
50 std::cout <<
"maximum relative error = " << error << std::endl;
54 error = testReluDerivative<TCpu<Scalar_t>>(10);
55 std::cout <<
"Testing ReLU activation derivative: ";
56 std::cout <<
"maximum relative error = " << error << std::endl;
62 error = testSigmoid<TCpu<Scalar_t>>(10);
63 std::cout <<
"Testing Sigmoid activation: ";
64 std::cout <<
"maximum relative error = " << error << std::endl;
68 error = testSigmoidDerivative<TCpu<Scalar_t>>(10);
69 std::cout <<
"Testing Sigmoid activation derivative: ";
70 std::cout <<
"maximum relative error = " << error << std::endl;
76 error = testTanh<TCpu<Scalar_t>>(10);
77 std::cout <<
"Testing TanH activation: ";
78 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
82 error = testTanhDerivative<TCpu<Scalar_t>>(10);
83 std::cout <<
"Testing TanH activation derivative: ";
84 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
90 error = testSymmetricRelu<TCpu<Scalar_t>>(10);
91 std::cout <<
"Testing Symm. ReLU activation: ";
92 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
96 error = testSymmetricReluDerivative<TCpu<Scalar_t>>(10);
97 std::cout <<
"Testing Symm. ReLU activation derivative: ";
98 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
104 error = testSoftSign<TCpu<Scalar_t>>(10);
105 std::cout <<
"Testing Soft Sign activation: ";
106 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
110 error = testSoftSignDerivative<TCpu<Scalar_t>>(10);
111 std::cout <<
"Testing Soft Sign activation derivative: ";
112 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
118 error = testGauss<TCpu<Scalar_t>>(10);
119 std::cout <<
"Testing Gauss activation: ";
120 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
124 error = testGaussDerivative<TCpu<Scalar_t>>(10);
125 std::cout <<
"Testing Gauss activation derivative: ";
126 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
std::string print_error(AFloat &e)
Color code error.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e