emergent 8.2.2 LayerState_cpp Class Reference
emergent 8.2.2   Home · Wiki Docs For: LayerState_cpp · Emergent Help Browser 

LayerState_cpp Class Reference

layer state variables -- for use in computational State code

See for more info: Wiki Docs For: LayerState_cpp

 #include <LayerState_cpp>

defined at: /mnt/ssd/grey/local/include/Emergent/LayerState_cpp.h :29-38

Inherited By: LayerState_cpp*, LayerState_cpp&, const LayerState_cpp, LeabraLayerState_cpp

Index: SubTypes, Members, Methods, Static Members, Static Methods, Expert Members, Expert Methods

Sub Types


SubType Documentation

enum LayerState_cpp::LayerType

type of layer, used to determine various default settings

ConstantValueDescription
LayerState_cpp::HIDDEN0x00000000layer does not receive external input of any form
LayerState_cpp::INPUT0x00000001layer receives external input (EXT) that drives activation states directly
LayerState_cpp::TARGET0x00000002layer receives a target input (TARG) that determines correct activation states, used for training
LayerState_cpp::OUTPUT0x00000003layer produces a visible output response but is not a target. any external input serves as a comparison (COMP) against current activations.

enum LayerState_cpp::LayerFlags

flags for layer

ConstantValueDescription
LayerState_cpp::LF_NONE0x00000000
LayerState_cpp::LESIONED0x00000001this layer is temporarily lesioned (inactivated for all network-level processing functions) -- IMPORTANT: use the Lesion and UnLesion functions to set this flag -- they provide proper updating after changes -- otherwise network dynamics will be wrong and the display will not be properly updated
LayerState_cpp::ICONIFIED0x00000002only display a single unit showing icon_value (set in algorithm-specific manner)
LayerState_cpp::NO_ADD_SSE0x00000004do NOT add this layer's sse value (sum squared error) to the overall network sse value: this is for all types of SSE computed for ext_flag = TARG (layer_type = TARGET) or ext_flag = COMP (layer_type = OUTPUT) layers
LayerState_cpp::NO_ADD_COMP_SSE0x00000008do NOT add this layer's sse value (sum squared error) to the overall network sse value: ONLY for ext_flag = COMP (OUTPUT) flag settings (NO_ADD_SSE blocks all contributions) -- this is relevant if the layer type or ext_flags are switched dynamically and only TARGET errors are relevant
LayerState_cpp::SAVE_UNIT_NAMES0x00000010save the names for individual units in the unit_names matrix on this layer (the Units themselves are never saved) -- when the network is built, these names are then assigned to the units -- use SetUnitNames method to update unit names from unit_names matrix if you've changed them, and GetUnitNames to save current unit names into unit_names matrix
LayerState_cpp::PROJECT_WTS_NEXT0x00000020this layer is next in line for weight projection operation
LayerState_cpp::PROJECT_WTS_DONE0x00000040this layer is done with weight projection operation (prevents loops)
LayerState_cpp::UN_GEOM_NOT_XY0x00000080unit geometry n != x*y -- requires extra math
LayerState_cpp::LAY_FLAG_10x00000100misc layer flag 1
LayerState_cpp::LAY_FLAG_20x00000200misc layer flag 2
LayerState_cpp::LAY_FLAG_30x00000400misc layer flag 3
LayerState_cpp::LAY_FLAG_40x00000800misc layer flag 2

enum LayerState_cpp::ExtFlags

indicates type of external input; some flags used in Layer to control usage

ConstantValueDescription
LayerState_cpp::NO_EXTERNAL0x00000000no input
LayerState_cpp::TARG0x00000001a target value used to train the network (value goes in targ field of unit)
LayerState_cpp::EXT0x00000002an external input value that drives activations (value goes in ext field of unit)
LayerState_cpp::COMP0x00000004a comparison value used for computing satistics but not training the network (value goes in targ field of unit)
LayerState_cpp::TARG_EXT0x00000003as both external input and target value
LayerState_cpp::COMP_TARG0x00000005as a comparision and target layer
LayerState_cpp::COMP_EXT0x00000006as a comparison and external input layer
LayerState_cpp::COMP_TARG_EXT0x00000007as a comparison, target, and external input layer


Regular (preferred) Member and Method Documentation

Members

Member Category: Activation

Member Category: Statistic

Member Category: _NoCategory

Methods

Method Category: State

Method Category: Structure

Method Category: _NoCategory


Member Documentation

Member Category: Activation

LayerState_cpp::ext_flag : LayerState_cpp::ExtFlags

indicates which kind of external input layer received -- this is normally set by the ApplyInputData function -- it is not to be manipulated directly

LayerState_cpp::layer_type : LayerState_cpp::LayerType

type of layer: determines default way that external inputs are presented, and helps with other automatic functions (e.g., wizards)

Member Category: Statistic

LayerState_cpp::avg_sse : Average_cpp

average sum squared error over an epoch or similar larger set of external input patterns

LayerState_cpp::cnt_err : float

count of number of times the sum squared error was above cnt_err_tol over an epoch or similar larger set of external input patterns

LayerState_cpp::epc_prerr : PRerrVals_cpp

precision and recall error values over an epoch or similar larger set of external input patterns

LayerState_cpp::pct_cor : float

epoch-wise average of count of number of times the sum squared error was below cnt_err_tol over an epoch or similar larger set of external input patterns (= 1 - pct_err -- just for convenience for whichever you want to plot)

LayerState_cpp::pct_err : float

epoch-wise average of count of number of times the sum squared error was above cnt_err_tol over an epoch or similar larger set of external input patterns (= cnt_err / n)

LayerState_cpp::sse : float

sum squared error over the network, for the current external input pattern

Member Category: _NoCategory

LayerState_cpp::flags : LayerState_cpp::LayerFlags

flags controlling various aspects of layer funcdtion


Method Documentation

Method Category: State

void LayerState_cpp::Copy_Weights ( NetworkState_cpp* net, LayerState_cpp* src, bool recv_cons )

copy weights from other layer, going projection-by-projection in order by index (only sensible if the layers have matching projection structure) -- either recv or send

Show Source Code

PrjnState_cpp* LayerState_cpp::FindRecvPrjnFrom ( NetworkState_cpp* net, int send_lay_idx )

find receiving projection from given layer index -- NULL if not found

Show Source Code

PrjnState_cpp* LayerState_cpp::FindRecvPrjnFromLay ( NetworkState_cpp* net, LayerState_cpp* send_lay )

find receiving projection from given sending layer -- NULL if not found

Show Source Code

PrjnState_cpp* LayerState_cpp::FindRecvPrjnFromName ( NetworkState_cpp* net, char* fm_layer_nm )

find receiving projection from given layer name -- NULL if not found

Show Source Code

PrjnState_cpp* LayerState_cpp::FindSendPrjnTo ( NetworkState_cpp* net, int to_lay_idx )

find sending projection to given layer index -- NULL if not found

Show Source Code

PrjnState_cpp* LayerState_cpp::FindSendPrjnToLay ( NetworkState_cpp* net, LayerState_cpp* to_lay )

find sending projection to given layer -- NULL if not found

Show Source Code

PrjnState_cpp* LayerState_cpp::FindSendPrjnToName ( NetworkState_cpp* net, char* to_layer_nm )

find sending projection to given layer name -- NULL if not found

Show Source Code

bool LayerState_cpp::FlatUnIdxInRange ( int un_no )

is flat unit index (for full set of units in layer, regardless of sub unit groups) in range (0 <= idx < n_units)?

Show Source Code

int LayerState_cpp::GetGpIdxFmXY ( int gp_x, int gp_y )

get group-level index for group X,Y coordinates -- valid for unit groups

Show Source Code

void LayerState_cpp::GetGpUnXYFmIdx ( int un_idx, int& gp_x, int& gp_y, int& un_x, int& un_y )

get group X,Y and unit X,Y coordinates from overall unit index within the layer

Show Source Code

void LayerState_cpp::GetGpXYFmIdx ( int gp_idx, int& gp_x, int& gp_y )

get group X,Y from group index within the layer

Show Source Code

LayerState_cpp* LayerState_cpp::GetLayGpLayer ( NetworkState_cpp* net, int lgp_idx )

get the given layer in the layer group this layer belongs in

Show Source Code

UnGpState_cpp* LayerState_cpp::GetLayUnGpState ( NetworkState_cpp* net )

get the main unit group state for this layer

Show Source Code

LayerSpec_cpp* LayerState_cpp::GetLayerSpec ( NetworkState_cpp* net )

get the layer spec for this layer

Show Source Code

LayerState_cpp* LayerState_cpp::GetLayerState ( NetworkState_cpp* net )

get the layer state for this layer

Show Source Code

PrjnState_cpp* LayerState_cpp::GetRecvPrjnState ( NetworkState_cpp* net, int prjn_no )

get the receiving projection state for given projection index within this layer (0 = first one for this layer, etc)

Show Source Code

PrjnState_cpp* LayerState_cpp::GetSendPrjnState ( NetworkState_cpp* net, int prjn_no )

get the sending projection state for given projection index within this layer (0 = first one for this layer, etc)

Show Source Code

void LayerState_cpp::GetUnFlatXYFmIdx ( int un_idx, int& un_x, int& un_y )

get unit X,Y from flat unit index within layer

Show Source Code

UnGpState_cpp* LayerState_cpp::GetUnGpState ( NetworkState_cpp* net, int ungp_no )

get the sub-unit group state for given unit group number for this layer

Show Source Code

UnGpState_cpp* LayerState_cpp::GetUnGpStateXY ( NetworkState_cpp* net, int gp_x, int gp_y )

get the sub-unit group state for given unit group X,Y coordinates

Show Source Code

int LayerState_cpp::GetUnIdxFmXY ( int un_x, int un_y )

get unit-level index for unit X,Y coordinates -- valid for index within unit group or within entire layer if no unit groups

Show Source Code

void LayerState_cpp::GetUnXYFmIdx ( int un_idx, int& un_x, int& un_y )

get unit X,Y from unit index within a unit group

Show Source Code

UnitSpec_cpp* LayerState_cpp::GetUnitSpec ( NetworkState_cpp* net )

get the unit spec for this layer

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitState ( NetworkState_cpp* net, int un_no )

get the unit state at given index within full list of units in the layer

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateFlatXY ( NetworkState_cpp* net, int fl_x, int fl_y )

get the unit state at given flat X,Y coordinates -- NULL if out of range

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateGpIdxUnXY ( NetworkState_cpp* net, int gp_dx, int un_x, int un_y )

get the unit state at given group index and unit X,Y coordinate

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateGpUnIdx ( NetworkState_cpp* net, int gp_dx, int un_dx )

get the unit state at given group and unit indexes -- also works for gp_dx = 0 if there are no sub unit groups

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateGpUnXY ( NetworkState_cpp* net, int gp_x, int gp_y, int un_x, int un_y )

get the unit state at given group X,Y and unit X,Y coordinates

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateGpXYUnIdx ( NetworkState_cpp* net, int gp_x, int gp_y, int un_dx )

get the unit state at given group X,Y coordinate and unit indexes

Show Source Code

UnitState_cpp* LayerState_cpp::GetUnitStateSafe ( NetworkState_cpp* net, int un_no )

get the unit state at given index within full list of units in the layer -- safe range checking

Show Source Code

bool LayerState_cpp::GpIdxInRange ( int gp_no )

is sub unit group index in range? always false if layer does not have unit groups

Show Source Code

bool LayerState_cpp::HasUnitGroups ( )

does this layer have sub-unit groups

Show Source Code

void LayerState_cpp::Init_Weights ( NetworkState_cpp* net, bool recv_cons )

initialize weights for all the recv or send projections in this layer

Show Source Code

bool LayerState_cpp::LayerNameContains ( char* lay_name )

return true if the layer name contains the given string

Show Source Code

bool LayerState_cpp::LayerNameIs ( char* lay_name )

return true if that is the name of the layer

Show Source Code

void LayerState_cpp::SetLayerName ( char* lay_name )

set layer name to given name

Show Source Code

bool LayerState_cpp::UnIdxInRange ( int un_no )

is unit index in range according to un_geom_n (0 <= idx < un_geom_n) -- valid for units without sub unit groups or for accessing units within unit group

Show Source Code

Method Category: Structure

bool LayerState_cpp::InLayerSubGroup ( )

is this layer in a layer subgroup or directly in network.layers main layer group?

Show Source Code

Method Category: _NoCategory

void LayerState_cpp::ClearExtFlag ( int flg )

clear flag state (set off)

Show Source Code

void LayerState_cpp::ClearLayerFlag ( int flg )

clear flag state (set off)

Show Source Code

bool LayerState_cpp::HasExtFlag ( int flg )

check if flag is set

Show Source Code

bool LayerState_cpp::HasLayerFlag ( int flg )

check if flag is set

Show Source Code

bool LayerState_cpp::Iconified ( )

convenience function for checking iconified flag

Show Source Code

void LayerState_cpp::SetExtFlag ( int flg )

set flag state on

Show Source Code

void LayerState_cpp::SetExtFlagState ( int flg, bool on )

set flag state according to on bool (if true, set flag, if false, clear it)

Show Source Code

void LayerState_cpp::SetLayerFlag ( int flg )

set flag state on

Show Source Code

void LayerState_cpp::SetLayerFlagState ( int flg, bool on )

set flag state according to on bool (if true, set flag, if false, clear it)

Show Source Code

bool LayerState_cpp::lesioned ( )

check if this layer is lesioned -- use in function calls

Show Source Code

Static Member and Method Documentation

Static Members

Static Methods


Static Method Documentation


Expert Member and Method Documentation

Expert Members

Expert Member Category: State

Expert Member Category: Statistic

Expert Methods

Expert Method Category: Statistic


Expert Member Documentation

Expert Member Category: State

LayerState_cpp::flat_geom_n : int

overall flat net two-dimensional layout and number of units within the layer, multiplying un_geom * gp_geom

LayerState_cpp::flat_geom_x : int

overall flat net two-dimensional layout and number of units within the layer, multiplying un_geom * gp_geom

LayerState_cpp::flat_geom_y : int

overall flat net two-dimensional layout and number of units within the layer, multiplying un_geom * gp_geom

LayerState_cpp::gp_geom_n : int

two-dimensional layout and number of unit groups (akin to hypercolumns in cortex) within the layer -- if n_ungps > 0 -- un_geom is geometry of each such unit group

LayerState_cpp::gp_geom_x : int

two-dimensional layout and number of unit groups (akin to hypercolumns in cortex) within the layer -- if n_ungps > 0 -- un_geom is geometry of each such unit group

LayerState_cpp::gp_geom_y : int

two-dimensional layout and number of unit groups (akin to hypercolumns in cortex) within the layer -- if n_ungps > 0 -- un_geom is geometry of each such unit group

LayerState_cpp::gp_spc_x : int

spacing between groups -- for display only

LayerState_cpp::gp_spc_y : int

spacing between groups -- for display only

LayerState_cpp::layer_idx : int

index of this layer in the network state_layers list and NetworkState layers array -- -1 if not active..

LayerState_cpp::layer_name : char_ary

name of this layer -- needed for loading and saving weights

LayerState_cpp::laygp_lay0_idx : int

index of first layer in the layer group that this layer belongs in -- the first layer takes the lead for whole group -- -1 if not part of a layer group

LayerState_cpp::laygp_n : int

number of layers in the layer group -- set for all members of the group

LayerState_cpp::main_obj : bool

true if this is a main-side object (emergent, TA-enabled) as opposed to a State-side object

LayerState_cpp::n_recv_prjns : int

number of active receiving projections

LayerState_cpp::n_send_prjns : int

number of active sending projections

LayerState_cpp::n_ungps : int

number of unit groups beyond main layer one -- 0 = no unit groups -- set during state build

LayerState_cpp::n_units : int

number of units in the layer

LayerState_cpp::net_state : NetworkState_cpp*

our own network state

LayerState_cpp::prjn_start_idx : int

starting index of recv prjns in list of projection states, -1 if none

LayerState_cpp::send_prjn_start_idx : int

starting index of sending prjns in list of sending projection indexes, -1 if none

LayerState_cpp::spec_idx : int

layer spec index in list in NetworkState

LayerState_cpp::un_geom_n : int

two-dimensional layout and number of units within the layer or each unit group within the layer

LayerState_cpp::un_geom_x : int

two-dimensional layout and number of units within the layer or each unit group within the layer

LayerState_cpp::un_geom_y : int

two-dimensional layout and number of units within the layer or each unit group within the layer

LayerState_cpp::ungp_idx : int

unit group index for this layerstate in the networkstate list of unit group state -- this is the main units unit group and subsequent sub-unit-groups are ordered after this one in master list

LayerState_cpp::unit_spec_idx : int

unit spec index in list in NetworkState

LayerState_cpp::units_flat_idx : int

starting index for this layer into the network units_flat list, used in threading

Expert Member Category: Statistic

LayerState_cpp::cur_cnt_err : float

current cnt_err -- used for computing cnt_err

LayerState_cpp::icon_value : float

value to display if layer is iconified (algorithmically determined)

LayerState_cpp::prerr : PRerrVals_cpp

precision and recall error values for this layer, for the current pattern

LayerState_cpp::sum_prerr : PRerrVals_cpp

precision and recall error values over an epoch or similar larger set of external input patterns -- these are always up-to-date as the system is aggregating, given the additive nature of the statistics


Expert Method Documentation

Expert Method Category: Statistic

void LayerState_cpp::Init_Stats ( )

initialize statistic variables on layer -- called by Network Init_Stats

Show Source Code


Copyright © 2017Regents of the University of Colorado, Carnegie Mellon University, Princeton University.
emergent 8.2.2