TarzaNN
TarzaNN neural network simulator
|
#include <Network.h>
Public Member Functions | |
Network (UI_MainWindow *theMainWindow, QObject *app, char *inputFileName=NULL) | |
~Network () | |
void | run () |
void | terminate () |
void | save (QString filename) |
void | load (char *inputFileName) |
void | resetLayers () |
void | assignLayers () |
void | XMLSerialize (int tabs, QTextStream *buf) |
FeaturePlaneAbstract * | addFeaturePlane (QString *newName, QString newFPType, paramMap newParams, int l) |
FeaturePlaneAbstract * | editFeaturePlane (FeaturePlaneAbstract *theOld, QString *newName, QString newFPType, paramMap newParams, int l) |
void | deleteFeaturePlane (FeaturePlaneAbstract *oldFP) |
FeaturePlaneInput * | addFeaturePlaneInput (FeaturePlaneAbstract *FPSource, FeaturePlaneAbstract *FPDest, QString newFType, paramMap newParams, int newInputType, int newOutputIndex) |
FeaturePlaneInput * | editFeaturePlaneInput (FeaturePlaneInput *oldElement, QString newFType, paramMap newParams, int newInputType, int newOutputIndex) |
void | deleteFeaturePlaneInput (FeaturePlaneInput *theElement) |
int | addLayer (QString name, int dirs, int scales, int type=0) |
void | addToLayer (FeaturePlaneAbstract *cur, int count) |
void | setMonitor (Monitor *m) |
Monitor * | getMonitor () |
void | setLearningOutputFP (LearningFeaturePlane *fp) |
LearningFeaturePlane * | getLearningOutputFP () |
void | setLearningWinner (Matrix *c) |
Matrix * | getLearningWinner () |
FeaturePlaneAbstract * | getInputFP () |
FeaturePlaneAbstract * | getFPByName (QString searchName) |
void | applyIOR () |
Trigger IOR on the network. | |
int | getLayerCount () |
Get number of Layers. | |
Layer * | getLayer (int layerIndex) |
Get a Layer. | |
int | getDepth () |
Get network depth - i.e. max distance from input to an FP. | |
void | readLearningLayer () |
void | readLearningLayer (QString s) |
void | saveLearningLayer () |
void | saveLearningLayer (QString s) |
bool | isPaused () |
Is network paused? | |
void | setPaused (bool status) |
Pause network. | |
void | notifyChangeDisplay () |
void | setupFeatureTask () |
void | setupSpatialTask (OutputImage *tmpSpatialBias) |
Static Public Member Functions | |
static void | tabulate (int tabs, QTextStream *buf) |
static Network * | getNetwork () |
static void | setNetwork (Network *nn) |
Public Attributes | |
vector< NodeProxy * > | _nodeList |
vector< FeaturePlaneAbstract * > | _featurePlaneList |
vector< FeaturePlaneAbstract * > * | _learningFeaturePlanes |
vector< Layer * > | _featurePlaneLayers |
QMutex * | _featurePlaneLayerMutex |
QWaitCondition * | _featurePlaneLayerCond |
UI_MainWindow * | mainWindow |
bool | changed |
Static Public Attributes | |
static Network * | theNetworkInstance = NULL |
static bool | useStepByStep = false |
Sync - stop after each pass through the network. | |
static bool | useLayerByLayer = false |
Sync - stop after each layer. | |
static QWaitCondition | pauseWaitCond |
static QMutex | threadStatus |
static bool | shouldPause = false |
static bool | doSTM_WTA = false |
The root data structure. It contains Nodes (real and proxy) and FeaturePlanes (real and proxy). A network can be created through XML or through direct coding.
Network::Network | ( | UI_MainWindow * | theMainWindow, |
QObject * | app, | ||
char * | inputFileName = NULL |
||
) |
GUI constructor.
theMainWindow | - the main window of the application |
app | - the application |
Network::~Network | ( | ) |
Destructor
FeaturePlaneAbstract * Network::addFeaturePlane | ( | QString * | newName, |
QString | newFPType, | ||
paramMap | newParams, | ||
int | l | ||
) |
FeaturePlaneInput * Network::addFeaturePlaneInput | ( | FeaturePlaneAbstract * | FPSource, |
FeaturePlaneAbstract * | FPDest, | ||
QString | newFType, | ||
paramMap | newParams, | ||
int | newInputType, | ||
int | newOutputIndex | ||
) |
int Network::addLayer | ( | QString | name, |
int | dirs, | ||
int | scales, | ||
int | type = 0 |
||
) |
void Network::addToLayer | ( | FeaturePlaneAbstract * | cur, |
int | count | ||
) |
void Network::applyIOR | ( | ) |
Trigger IOR on the network.
void Network::assignLayers | ( | ) |
Assign layer numbers
void Network::deleteFeaturePlane | ( | FeaturePlaneAbstract * | oldFP | ) |
void Network::deleteFeaturePlaneInput | ( | FeaturePlaneInput * | theElement | ) |
FeaturePlaneAbstract * Network::editFeaturePlane | ( | FeaturePlaneAbstract * | theOld, |
QString * | newName, | ||
QString | newFPType, | ||
paramMap | newParams, | ||
int | l | ||
) |
FeaturePlaneInput * Network::editFeaturePlaneInput | ( | FeaturePlaneInput * | oldElement, |
QString | newFType, | ||
paramMap | newParams, | ||
int | newInputType, | ||
int | newOutputIndex | ||
) |
int Network::getDepth | ( | ) |
Get network depth - i.e. max distance from input to an FP.
FeaturePlaneAbstract * Network::getFPByName | ( | QString | searchName | ) |
FeaturePlaneAbstract * Network::getInputFP | ( | ) |
int Network::getLayerCount | ( | ) |
Get number of Layers.
LearningFeaturePlane * Network::getLearningOutputFP | ( | ) |
Matrix * Network::getLearningWinner | ( | ) |
Monitor * Network::getMonitor | ( | ) |
static Network* Network::getNetwork | ( | ) | [inline, static] |
bool Network::isPaused | ( | ) | [inline] |
Is network paused?
void Network::load | ( | char * | inputFileName | ) |
loads the content of a network from a file
void Network::notifyChangeDisplay | ( | ) |
void Network::readLearningLayer | ( | ) |
void Network::readLearningLayer | ( | QString | s | ) |
void Network::resetLayers | ( | ) |
Clear the layers data structure. Useful when redesigning an existing network, to keep _featurePlaneLayers and _featurePlaneList in sync
void Network::run | ( | ) |
Start network execution
void Network::save | ( | QString | filename | ) |
saves the content of a network in a file
void Network::saveLearningLayer | ( | ) |
void Network::saveLearningLayer | ( | QString | s | ) |
void Network::setLearningOutputFP | ( | LearningFeaturePlane * | fp | ) |
void Network::setLearningWinner | ( | Matrix * | c | ) |
void Network::setMonitor | ( | Monitor * | m | ) |
static void Network::setNetwork | ( | Network * | nn | ) | [inline, static] |
void Network::setPaused | ( | bool | status | ) | [inline] |
Pause network.
void Network::setupFeatureTask | ( | ) |
Read activations and set up task biases, reset network
void Network::setupSpatialTask | ( | OutputImage * | tmpSpatialBias | ) |
Apply spatial mask to output, propagate towards input
void Network::tabulate | ( | int | tabs, |
QTextStream * | buf | ||
) | [static] |
Pretty-print for XMLSerialize
void Network::terminate | ( | ) |
TBD
void Network::XMLSerialize | ( | int | tabs, |
QTextStream * | buf | ||
) |
Cast the network as XML
QWaitCondition* Network::_featurePlaneLayerCond |
QMutex* Network::_featurePlaneLayerMutex |
vector<Layer*> Network::_featurePlaneLayers |
STL vector of all the layers in the system
STL vector of all the feature planes in the system
vector<NodeProxy*> Network::_nodeList |
STL vector of all the nodes in the system
bool Network::changed |
bool Network::doSTM_WTA = false [static] |
QWaitCondition Network::pauseWaitCond [static] |
bool Network::shouldPause = false [static] |
Network * Network::theNetworkInstance = NULL [static] |
QMutex Network::threadStatus [static] |
bool Network::useLayerByLayer = false [static] |
Sync - stop after each layer.
bool Network::useStepByStep = false [static] |
Sync - stop after each pass through the network.