26 std::cout <<
"Testing Loss Functions:" << std::endl << std::endl;
34 error = testMeanSquaredError<TCuda<Scalar_t>>(10);
35 std::cout <<
"Testing mean squared error loss: ";
36 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
40 error = testMeanSquaredErrorGradients<TCuda<Scalar_t>>(10);
41 std::cout <<
"Testing mean squared error gradient: ";
42 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
50 error = testCrossEntropy<TCuda<Scalar_t>>(10);
51 std::cout <<
"Testing cross entropy loss: ";
52 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
56 error = testCrossEntropyGradients<TCuda<Scalar_t>>(10);
57 std::cout <<
"Testing mean squared error gradient: ";
58 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
66 error = testSoftmaxCrossEntropy<TCuda<Scalar_t>>(10);
67 std::cout <<
"Testing softmax cross entropy loss: ";
68 std::cout <<
"maximum relative error = " <<
print_error(error) << std::endl;
72 error = testSoftmaxCrossEntropyGradients<TCuda<Scalar_t>>(10);
73 std::cout <<
"Testing softmax cross entropy gradient: ";
74 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