MachineIntelligenceCore:Toolchain
|
Parent class for all applications consisting of two phases: a training phase (first), and testing phase (second). Each phase will end when then an adequate method (performLearning/TrainingStep) will return false. By default all computations are made within a single thread. More...
#include <TrainThenTestApplication.hpp>
Public Member Functions | |
TrainThenTestApplication (std::string node_name_) | |
virtual | ~TrainThenTestApplication () |
void | run () |
![]() | |
Application (std::string node_name_) | |
virtual | ~Application () |
virtual void | initialize (int argc, char *argv[])=0 |
virtual void | displayStatus () |
![]() | |
PropertyTree (std::string node_name_) | |
virtual | ~PropertyTree () |
void | registerProperty (PropertyInterface &prop) |
std::string | getNodeName () const |
void | loadPropertiesFromConfigNode (boost::property_tree::ptree const &pt_) |
void | printProperties () |
void | printPropertiesWithValues () |
PropertyInterface * | getProperty (const std::string &name) |
virtual void | initializePropertyDependentVariables ()=0 |
Protected Member Functions | |
virtual bool | performSingleStep () |
virtual bool | performLearningStep ()=0 |
virtual bool | performTestingStep ()=0 |
Additional Inherited Members | |
![]() | |
unsigned long | iteration |
Iteration counter. More... | |
mic::configuration::Property < long > | number_of_iterations |
Parent class for all applications consisting of two phases: a training phase (first), and testing phase (second). Each phase will end when then an adequate method (performLearning/TrainingStep) will return false. By default all computations are made within a single thread.
Definition at line 39 of file TrainThenTestApplication.hpp.
mic::application::TrainThenTestApplication::TrainThenTestApplication | ( | std::string | node_name_ | ) |
Default constructor. Sets the application/node name and registers properties.
node_name_ | Name of the application/node (in configuration file). |
Definition at line 29 of file TrainThenTestApplication.cpp.
References APP_STATE.
|
inlinevirtual |
Default destructor - empty.
Definition at line 50 of file TrainThenTestApplication.hpp.
|
protectedpure virtual |
Perform learning step - abstract, to be overridden.
Referenced by performSingleStep().
|
protectedvirtual |
Performs single step of computations. Depending on the state, calls learning or testing step - switches from learning to testing then learning return false.
Implements mic::application::Application.
Definition at line 66 of file TrainThenTestApplication.cpp.
References APP_STATE, performLearningStep(), and performTestingStep().
Referenced by run().
|
protectedpure virtual |
Perform testing step - abstract, to be overridden.
Referenced by performSingleStep().
|
virtual |
Main application method - runs consecutive steps, first learning (in several steps, until performLearningStep() will return false) then testing (until performTestingStep() will return false, then finish).
Reimplemented from mic::application::Application.
Definition at line 36 of file TrainThenTestApplication.cpp.
References APP_DATA_SYNCHRONIZATION_SCOPED_LOCK, APP_SLEEP, APP_STATE, mic::application::Application::iteration, and performSingleStep().