CopyLinker Class. More...
Public Member Functions | |
CopyLinker (Cluster *from, Cluster *to, QString name="unnamed") | |
Constructor. More... | |
CopyLinker (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
virtual | ~CopyLinker () |
Destructor. More... | |
void | randomize (double, double) |
Randomize (i.e. More... | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. More... | |
unsigned int | size () const |
Returns the number of neurons connected. More... | |
void | update () |
Update the linker. More... | |
Public Member Functions inherited from Linker | |
Linker (Cluster *from, Cluster *to, QString name="unnamed") | |
Construct. More... | |
Linker (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
void | configureFromVector (QString vectorName) |
Configure on which state vector of 'from' Cluster this Linker is attached to. More... | |
void | configureToVector (QString vectorName) |
Configure on which state vector of 'to' Cluster this Linker is attached to. More... | |
Cluster * | from () const |
Return the Cluster From. More... | |
Cluster * | to () const |
Return the Cluster to. More... | |
Public Member Functions inherited from Updatable | |
Updatable (QString name="unnamed") | |
Constructor. More... | |
Updatable (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. More... | |
virtual | ~Updatable () |
Destructor. More... | |
QString | name () const |
Return its name. More... | |
void | setName (QString newname) |
Set the name of Updatable. More... | |
Public Member Functions inherited from ParameterSettableInConstructor | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
Public Member Functions inherited from ParameterSettable | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Additional Inherited Members | |
Public Types inherited from ParameterSettable | |
enum | Property |
Static Public Member Functions inherited from Linker | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. More... | |
Static Public Member Functions inherited from Updatable | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. More... | |
Static Public Member Functions inherited from ParameterSettable | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Public Attributes inherited from ParameterSettable | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
Static Public Attributes inherited from ParameterSettable | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
Protected Member Functions inherited from Linker | |
DoubleVector & | fromVector () const |
Return a reference to the DoubleVector of 'from' on which this is attached to. More... | |
DoubleVector & | toVector () const |
Return a reference to the DoubleVector of 'to' on which this is attached to. More... | |
Protected Member Functions inherited from ParameterSettable | |
void | notifyChangesToParam (QString paramName) |
Static Protected Member Functions inherited from ParameterSettable | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
Detailed Description
CopyLinker Class.
This linker copies the outputs of a cluster to inputs of another cluster
- Motivation
- The CopyLinker is useful in networks when one requires that data be transferred from one Cluster's terminal to another without computation. For example, in Elmann networks the values of hidden layer inputs are copied to the context layer Cluster (which acts like a short-term memory of former inputs).
- Description
- The CopyLinker is an object that 'literally' copies the outputs from one Cluster to another. Use the fromVector and toVector for specifying the source and target vector for the Cluster
- Warnings
- If there is a mis-match in the dimensionality of the terminals connected by the CopyLinker, as much data as possible is copied. For example; a CopyLinker between a 'from' and 'to' Cluster with 8 and 5 inputs respectively, will copy the first 5 data elements for 'from' into the inputs for 'to'. Vice versa, if the dimensions of 'from' and 'to' are 5 and 8 respectively, then the 5 inputs of the 'from' cluster (all of the source data) are copied into the first 5 inputs of the 'to' Cluster (with 3 neurons receiving no input).
Definition at line 56 of file copylinker.h.
Constructor & Destructor Documentation
CopyLinker | ( | Cluster * | from, |
Cluster * | to, | ||
QString | name = "unnamed" |
||
) |
Constructor.
Definition at line 24 of file copylinker.cpp.
References Linker::fromVector(), CopyLinker::size(), and Linker::toVector().
CopyLinker | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor.
Definition at line 29 of file copylinker.cpp.
References Linker::fromVector(), CopyLinker::size(), and Linker::toVector().
|
virtual |
Destructor.
Definition at line 34 of file copylinker.cpp.
Member Function Documentation
|
inlinevirtual |
|
virtual |
Save the actual status of parameters into the ConfigurationParameters object passed.
This saves the name property, remember to call this in child classes
- Parameters
-
params the configuration parameters object on which save actual parameters prefix the prefix to use to access the object configuration parameters.
Reimplemented from Linker.
Definition at line 51 of file copylinker.cpp.
References Linker::save(), and ConfigurationParameters::startObjectParameters().
|
virtual |
Returns the number of neurons connected.
Implements Linker.
Definition at line 47 of file copylinker.cpp.
Referenced by CopyLinker::CopyLinker().
|
virtual |
Update the linker.
Implements Updatable.
Definition at line 37 of file copylinker.cpp.
References Linker::fromVector(), Cluster::resetInputs(), Linker::to(), and Linker::toVector().
The documentation for this class was generated from the following files:
- nnfw/include/copylinker.h
- nnfw/src/copylinker.cpp