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

ConSpec Class Reference

Connection specs: for processing over a set of connections all from the same projection -- all ConState functions should be called on one that owns the connections

See for more info: Wiki Docs For: ConSpec

 #include <ConSpec>

defined at: /mnt/ssd/grey/local/include/Emergent/ConSpec.h :58-97

Inherits From: BaseSpec, taNBase, taOBase, taBase

Inherited By: ConSpec*, ConSpec&, const ConSpec, BpConSpec, LeabraConSpec

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

Sub Types


SubType Documentation

enum BaseSpec::UsedStatus

ConstantValueDescription
BaseSpec::UNUSED0x00000000this spec has no children and is unused OR this spec and none of its children are used by any objects
BaseSpec::USED0x00000001this spec has no children and is used OR this spec and all of its children are used
BaseSpec::PARENT_USED0x00000002this spec is used but one or more of its child specs are unused
BaseSpec::CHILD_USED0x00000003this spec is not used but one or more of its child specs are used

enum ConSpec::ConVars

Connection variables -- must align with Connection obj

ConstantValueDescription
ConSpec::WT0x00000000the synaptic weight of connection
ConSpec::DWT0x00000001change in synaptic weight as computed by learning mechanism


Regular (preferred) Member and Method Documentation

Members

Member Category: ConSpec

Member Category: _NoCategory

Member Category: taBase

Methods

Method Category: Access

Method Category: Activation

Method Category: File

Method Category: Learning

Method Category: Modify

Method Category: ObjectMgmt

Method Category: State

Method Category: UserData

Method Category: _NoCategory


Member Documentation

Member Category: ConSpec

ConSpec::rnd : Random

Weight randomization specification. Note that NONE means no value at all, not the mean, and should be used if some other source is setting the weights, e.g., from a projectionspec or loading from a file etc

ConSpec::wt_limits : WeightLimits

limits on weight sign, symmetry

Member Category: _NoCategory

BaseSpec::desc : taString

Description of what this variable is for

Member Category: taBase

taNBase::name : taString

name of the object


Method Documentation

Method Category: Access

char* ConSpec::ConVarName ( int var_no )

name of given connection variable

Show Source Code

Variant BaseSpec::Elem ( Variant& idx, taBase::IndexMode mode = IDX_UNK )

get element(s) from container -- return can be a single item or a Matrix of multiple items, depending on the index -- see IndexMode for all the possible indexing modes and associated return values (some of which are not applicable to some containers, as documented for that container)

Show Source Code

int ConSpec::FindConVar ( ConState_cpp* cg, char* var_nm )

find index of given connection variable, -1 if not found

Show Source Code

Method Category: Activation

float ConSpec::Compute_Dist ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

compute net distance for con state (ie. euclidean distance)

Show Source Code

float ConSpec::Compute_Netin ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

compute net input for weights in this con state

Show Source Code

void ConSpec::Send_Netin ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

sender-based net input for con state (send net input to receivers) -- always goes into tmp matrix (thread_no >= 0!) and is then integrated into net through Compute_SentNetin function on units -- only for sender-owned connections!

Show Source Code

void ConSpec::Send_Netin_PerPrjn ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

sender-based net input, keeping projections separate, for con state (send net input to receivers) -- always goes into tmp matrix (thread_no >= 0!) and is then integrated into net through Compute_SentNetin function on units -- only for sender-owned connections!

Show Source Code

Method Category: File

bool ConSpec::SaveVar ( ConState_cpp* cg, NetworkState_cpp* net, int var_no )

should given variable be saved?

Show Source Code

Method Category: Learning

void ConSpec::ApplySymmetry_r ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

apply weight symmetrizing between reciprocal units -- recv owns cons version

Show Source Code

void ConSpec::ApplySymmetry_s ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

apply weight symmetrizing between reciprocal units -- send owns cons version

Show Source Code

void ConSpec::B_Compute_Weights ( UnitState_cpp* uv, NetworkState_cpp* net, int thr_no )

bias weight: update weights (ie. add delta-wt to wt, zero delta-wt)

Show Source Code

void ConSpec::B_Compute_dWt ( UnitState_cpp* uv, NetworkState_cpp* net, int thr_no )

bias weight: compute the delta-weight change -- recv owns cons version

Show Source Code

void ConSpec::B_Init_Weights ( UnitState_cpp* uv, NetworkState_cpp* net, int thr_no )

bias weight: initialize weight state variables (ie. at beginning of training)

Show Source Code

void ConSpec::B_Init_Weights_post ( UnitState_cpp* uv, NetworkState_cpp* net, int thr_no )

bias weight: post-weight init

Show Source Code

void ConSpec::B_Init_dWt ( UnitState_cpp* uv, NetworkState_cpp* net, int thr_no )

bias weight: initialize weight-change variables for all cons

Show Source Code

void ConSpec::C_Init_Weight_AddRndVar ( float& wt, int thr_no )

initialize the weight by adding number according to the random number specs, and apply weight limits (not symmetry)

Show Source Code

void ConSpec::C_Init_Weight_Rnd ( float& wt, int thr_no )

initialize the weight according to the random number specs, and apply weight limits (not symmetry)

Show Source Code

void ConSpec::C_Init_dWt ( float& dwt )

initialize weight-change variable to 0

Show Source Code

void ConSpec::Compute_Weights ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

update weights (ie. add delta-wt to wt, zero delta-wt)

Show Source Code

void ConSpec::Compute_dWt ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

compute the delta-weight change -- recv owns cons version

Show Source Code

void ConSpec::Init_Weights ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

initialize connection weights based on random parameter settings (ie. at beginning of training)

Show Source Code

void ConSpec::Init_Weights_Net ( )

initializes all weights in the network

Show Source Code

void ConSpec::Init_Weights_scale ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no, float init_wt_val = 1.0f )

only for Leabra: initialize connection weights by setting scale multiplier values to random values, and setting adaptive weights to given constant initial value (weights end up as product of scale * weight)

Show Source Code

void ConSpec::Init_dWt ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

initialize weight-change variables for all cons

Show Source Code

void ConSpec::SetConScale ( float scale, ConState_cpp* cg, int cidx, NetworkState_cpp* net, int thr_no )

set the connection scale parameter, for given connection index, for algorithms that support connection scale parameters (Leabra)

Show Source Code

Method Category: Modify

BaseSpec* BaseSpec::NewChild ( TypeDef* child_type )

create a new child spec that inherits from this one but can have its own unique parameters

Show Source Code

Method Category: ObjectMgmt

void BaseSpec::Defaults ( )

restore specs to their default original parameter values, for parameters that have a strong default value -- WARNING: you will lose any unique parameters for anything that has a strong default value

Show Source Code

taString taNBase::GetName ( )

Get the name of the object

Show Source Code

bool taNBase::HasName ( )

does the object have a name field that can be set?

Show Source Code

void taNBase::MakeNameUnique ( )

make sure my name is unique relative to names of objects associated with my owner (e.g., if it is a list object), typically because my name has changed, and owner needs to ensure that all names are unique

Show Source Code

void BaseSpec::SetMember ( taString& member, taString& value )

Set member to value for each of the selected objects. Member will be the member name or will be object_name.member_name, e.g. input_size.retina_size.x, replace any space with '_' . This also automatically sets the spec unique flag to 'On' so that this value is unique to this spec, and updates all the children of this spec so they can inherit this change (or not depending on their unique flags).

Show Source Code

bool taNBase::SetName ( taString& nm )

Set the object's name

Show Source Code

Method Category: State

int ConSpec::GetStateSpecType ( )

derived classes MUST override this and pass correct global type id

Show Source Code

void ConSpec::Init_Weights_post ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

// post-initialize state variables (ie. for scaling symmetrical weights, other wt state keyed off of weights, etc)

Show Source Code

void ConSpec::Init_Weights_sym_r ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

apply symmetry after weight init, recv based

Show Source Code

void ConSpec::Init_Weights_sym_s ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no )

apply symmetry after weight init, sender based

Show Source Code

void ConSpec::LoadWeightVal ( float wtval, ConState_cpp* cg, int cidx, NetworkState_cpp* net )

set loaded weight value for given connection index

Show Source Code

void ConSpec::RenormScales ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no, bool mult_norm, float avg_wt )

renormalize the connection scale values using either multiplicative (for positive-only weight values such as Leabra) or subtractive normalization (for pos/neg weight values, such as backprop) to hit the given average weight value -- only affects scale value -- only for algorithms that support scale (Leabra) -- need to call Init_Weights_post afterward at appropriate level! -- receiver based but uses generic, slow interace so can be called either way

Show Source Code

void ConSpec::RenormWeights ( ConState_cpp* cg, NetworkState_cpp* net, int thr_no, bool mult_norm, float avg_wt )

renormalize the weight values using either multiplicative (for positive-only weight values such as Leabra) or subtractive normalization (for pos/neg weight values, such as backprop) to hit the given average weight value -- only affects wt value -- need to call Init_Weights_post afterward at appropriate level! -- receiver based but uses generic, slow interace so can be called either way

Show Source Code

Method Category: UserData

void taOBase::RemoveAllUserData ( )

get rid of our user data list entirely -- this is done automatically when saving something that has no user data items, but you can also force it with this method -- deletes the whole list

Show Source Code

Method Category: _NoCategory

bool taNBase::AddFromTemplate ( taBase* obj, bool& is_acceptable )

handles drops from toolbar - when adding an object to a program, network, etc - e.g. dropping generic data table onto a program - set is_acceptable for objects 'not handled' but which are acceptable

Show Source Code

void BaseSpec::ApplyTo ( SpecUser* obj1, SpecUser* obj2 = __null, SpecUser* obj3 = __null, SpecUser* obj4 = __null )

apply this spec to given object(s) (leave NULL any that are not needed)

Show Source Code

bool ConSpec::CheckConfig_RecvCons ( Projection* prjn, bool quiet = false )

check for for misc configuration settings required by different algorithms

Show Source Code

bool BaseSpec::CheckObjectType ( taBase* obj )

checks object type, issues error and returns false if not sufficient

Show Source Code

bool BaseSpec::CheckType ( TypeDef* td )

checks typedef type, issues error and returns false if not sufficient

Show Source Code

void BaseSpec::ComparePeers ( BaseSpec* spec )

calls network::SpecComparePeers to populate a table that compares this specs member values with its children's values - this data does not update - call again if you edit spec values!

Show Source Code

void BaseSpec::CompareWithChildren ( )

calls network::SpecCompareWithChildren to populate a table that compares this specs member values with its children's values - this data does not update - call again if you edit spec values!

Show Source Code

BaseSpec* BaseSpec::FindMakeChild ( taString& nm, TypeDef* td = __null, bool& nw_itm = nw_itm_def_arg, taString& alt_nm )

find a child spec of given name, and if not, make it (if nm is not found and alt_nm != NULL, it is searched for)

Show Source Code

BaseSpec* BaseSpec::FindParent ( )

Find the parent spec of this one

Show Source Code

taBase* taOBase::GetOwner ( )

Show Source Code

void ConSpec::GetPrjnName ( Projection& prjn, taString& nm )

add anything special for this type of connection to the projection name -- default name (FM_from) is provided as a nm value, which this function can modify in any way

Show Source Code

TypeDef* ConSpec::GetTypeDef ( )

Show Source Code

bool BaseSpec::GetUnique ( taString& memb_nm )

check inherit bit

Show Source Code

bool BaseSpec::IsInheritedAndHasParent ( taString& memb_nm )

is given member inherited from its parent (i.e., NOT unique) and parent actually has this member ot inherit from

Show Source Code

bool BaseSpec::RemoveChild ( taString& nm, TypeDef* td = __null )

remove a child based on name or type

Show Source Code

void BaseSpec::SetUnique ( taString& memb_nm, bool on )

set inherit bit

Show Source Code

bool BaseSpec::SpecInheritsFrom ( BaseSpec* spec )

returns true if this spec is the spec, or is one of its children

Show Source Code

void BaseSpec::UpdateChildren ( )

update any children

Show Source Code

void BaseSpec::UpdateMember ( BaseSpec* from, int memb_no )

copy member from given parent

Show Source Code

void BaseSpec::UpdateSpec ( )

update values from parent, and update children

Show Source Code

void ConSpec::UpdateStateSpecs ( )

Update our corresponding state-side specs -- called in UAE, and call when specifically updating parameters -- each base class needs to define this, getting the proper specs etc

Show Source Code

void BaseSpec::UpdateSubSpecs ( )

update any subspec objects (overload me)

Show Source Code

bool BaseSpec::UpdtIsUsed ( bool gui_updt = true )

update the is_used flag and used_status variable -- returns is_used flag

Show Source Code

void BaseSpec::WhereUsed ( )

display a clickable list of objects that use this spec

Show Source Code

void BaseSpec::WhereUsed_impl ( taBase_PtrList& spec_user_list, String_Array& spec_name_list, bool child )

fill the list of objects where this spec is used - if searching for child specs of the original spec pass true (additional feedback to user)

Show Source Code

taSigLink** taOBase::addr_sig_link ( )

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: _NoCategory

Expert Member Category: taBase

Expert Methods

Expert Method Category: UserData


Expert Member Documentation

Expert Member Category: _NoCategory

BaseSpec::children : BaseSpec_Group

sub-specs descending from this one and inheriting values

BaseSpec::is_new : bool

is this spec newly created? if so, prompt user to apply it to some objects..

BaseSpec::is_used : bool

is THIS spec used - ignore usage of children

BaseSpec::min_obj_type : TypeDef*

mimimal object type required for spec -- for object that the spec actually operates on

BaseSpec::min_user_type : TypeDef*

mimimal object type required for spec -- for object that manages the spec and the user applies it to

BaseSpec::saved : NameVar_Array

values of members that are not overriding parent values - reset to these values if override is click

ConSpec::spec_idx : int

index of this spec in list of specs

BaseSpec::unique : String_Array

string list of unique members

BaseSpec::used_status : BaseSpec::UsedStatus

for gui use only to indicate to user the usage of this spec and child specs

Expert Member Category: taBase

taOBase::owner : taBase*

pointer to owner

taOBase::user_data_ : UserDataItem_List*

storage for user data (created if needed) DO NOT ACCESS this list directly -- use the GetUserData / SetUserData etc interface!


Expert Method Documentation

Expert Method Category: UserData

UserDataItem_List* taOBase::GetUserDataList ( bool force = false )

gets the userdatalist for this class

Show Source Code


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