
Go to the source code of this file.
Functions | |
template < class FunctionType > | |
| double | CheckGradient (FunctionType &function, const double eps=1e-7) |
template < class FunctionType > | |
| double | CheckRegularizerGradient (FunctionType &function, const double eps=1e-7) |
template < typename ModuleType > | |
| double | CustomJacobianTest (ModuleType &module, arma::mat &input, const double perturbation=1e-6) |
template < typename ModuleType > | |
| double | JacobianPerformanceTest (ModuleType &module, arma::mat &input, arma::mat &target, const double eps=1e-6) |
template < typename ModuleType > | |
| double | JacobianTest (ModuleType &module, arma::mat &input, const double minValue=-2, const double maxValue=-1, const double perturbation=1e-6) |
template < class T > | |
| void | ResetFunction (T &layer, typename std::enable_if< HasResetCheck< T, void(T::*)()>::value >::type *=0) |
template < class T > | |
| void | ResetFunction (T &, typename std::enable_if<!HasResetCheck< T, void(T::*)()>::value >::type *=0) |
This file includes some useful functions for ann tests.
mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.
Definition in file ann_test_tools.hpp.
| double CheckGradient | ( | FunctionType & | function, |
| const double | eps = 1e-7 |
||
| ) |
Definition at line 188 of file ann_test_tools.hpp.
| double CheckRegularizerGradient | ( | FunctionType & | function, |
| const double | eps = 1e-7 |
||
| ) |
Definition at line 223 of file ann_test_tools.hpp.
| double CustomJacobianTest | ( | ModuleType & | module, |
| arma::mat & | input, | ||
| const double | perturbation = 1e-6 |
||
| ) |
Definition at line 105 of file ann_test_tools.hpp.
References ResetFunction().
| double JacobianPerformanceTest | ( | ModuleType & | module, |
| arma::mat & | input, | ||
| arma::mat & | target, | ||
| const double | eps = 1e-6 |
||
| ) |
Definition at line 155 of file ann_test_tools.hpp.
| double JacobianTest | ( | ModuleType & | module, |
| arma::mat & | input, | ||
| const double | minValue = -2, |
||
| const double | maxValue = -1, |
||
| const double | perturbation = 1e-6 |
||
| ) |
Definition at line 40 of file ann_test_tools.hpp.
References RandomInitialization::Initialize(), and ResetFunction().
| void ResetFunction | ( | T & | layer, |
| typename std::enable_if< HasResetCheck< T, void(T::*)()>::value >::type * | = 0 |
||
| ) |
Definition at line 22 of file ann_test_tools.hpp.
Referenced by CustomJacobianTest(), and JacobianTest().
| void ResetFunction | ( | T & | , |
| typename std::enable_if<!HasResetCheck< T, void(T::*)()>::value >::type * | = 0 |
||
| ) |
Definition at line 30 of file ann_test_tools.hpp.