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

MarkerGpOneToOnePrjnSpec Class Reference

unit_group based one-to-one connectivity for marking a projection -- all of the recv units receive from just the first unit in the sending unit group, thus providing a marker for where to receive information from the sending group

See for more info: Wiki Docs For: MarkerGpOneToOnePrjnSpec

 #include "AllProjectionSpecs.h"

defined at: /mnt/ssd/grey/local/include/Emergent/AllProjectionSpecs.h :100-111

Inherits From: OneToOnePrjnSpec, ProjectionSpec, BaseSpec, taNBase, taOBase, taBase

Inherited By: MarkerGpOneToOnePrjnSpec*, MarkerGpOneToOnePrjnSpec&, const MarkerGpOneToOnePrjnSpec

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


Regular (preferred) Member and Method Documentation

Members

Member Category: State

Member Category: _NoCategory

Member Category: taBase

Methods

Method Category: Access

Method Category: Modify

Method Category: ObjectMgmt

Method Category: State

Method Category: UserData

Method Category: Weights

Method Category: _NoCategory


Member Documentation

Member Category: State

ProjectionSpec::init_wt_val : float

constant initial weight value for specs that do not support a custom init_wts function and have set_scale set: the scale values are set to what the random weights would otherwise be set to, and the initial weight value is set to this constant: the net actual weight value is scale * init_wt_val..

ProjectionSpec::init_wts : bool

whether this projection spec should initialize the connection weights according to specific options supported by some specialized projection specs (e.g., topographically-organized connections) -- for any specs that do not have specific support for this, it will just fall back on the connection spec random weight settings, EXCEPT if set_scale is also selected, in which case it will set the scale values instead of the weights

ProjectionSpec::renorm_wts : RenormInitWtsSpec

renormalize initial weight values -- this can be done even if this projection does not have init_wts set -- if set_scale is set, then the scales are renormalized instead of the weights

ProjectionSpec::self_con : bool

whether to create self-connections or not (if applicable)

ProjectionSpec::set_scale : bool

only for Leabra algorithm: if initializing the weights, set the connection scaling parameter in addition to intializing the weights -- for specifically-supported specs, this will for example set a gaussian scaling parameter on top of random initial weights, instead of just setting the initial weights to a gaussian weighted value -- for other specs that do not support a custom init_wts function, this will set the scale values to what the random weights would otherwise be set to, and set the initial weight value to a constant (init_wt_val)

Member Category: _NoCategory

ProjectionSpec::add_rnd_var : bool

if init_wts is set, use the random weight settings on the conspec to add random values to the weights set by the projection spec -- the mean of the random distribution is subtracted, so we're just adding variance, not any mean value

BaseSpec::desc : taString

Description of what this variable is for

OneToOnePrjnSpec::n_conns : int

number of connections to make (-1 for size of layer)

OneToOnePrjnSpec::recv_start : int

starting unit index for recv connections

OneToOnePrjnSpec::send_start : int

starting unit index for sending connections

OneToOnePrjnSpec::use_gp : bool

if unit groups are present in the recv or sender layer, and the other layer fits within one unit group, then connectivity will be replicated for across groups in that layer

Member Category: taBase

taNBase::name : taString

name of the object


Method Documentation

Method Category: Access

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

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

bool ProjectionSpec::ConnectPassCheck ( PrjnState_cpp* prjn, NetworkState_cpp* net, int pass )

check if this projection should Connect_impl for given pass number (1 or 2), which sets value of make_cons -- default is to run on pass 1 and not 2 -- typically pass 2 is used for making symmetric connections -- spec must handle make_cons = 2 properly if this is true!

Show Source Code

void ProjectionSpec::Connect_Cons ( PrjnState_cpp* prjn, NetworkState_cpp* net, int pass )

second pass connection -- actually makes the connections via Connect_impl(true), and then calls Init_Weights -- called in two passes 1 for most cons, 2 for symmetric cons (or other special cases) that might depend on others -- see ConnectPassCheck

Show Source Code

void ProjectionSpec::Connect_Sizes ( PrjnState_cpp* prjn, NetworkState_cpp* net )

first-pass connects the network, doing Connect_impl(false), ending up with target allocation sizes

Show Source Code

void MarkerGpOneToOnePrjnSpec::Connect_impl ( PrjnState_cpp* prjn, NetworkState_cpp* net, int make_cons )

actually implements specific connection code -- called in *three* passes -- first with make_cons = 0 / false does allocation, and second with make_cons = 1 -- third pass with make_cons = 2 is only called if ConnectPass2() is true -- typically for symmetric connections

Show Source Code

int MarkerGpOneToOnePrjnSpec::GetStateSpecType ( )

derived classes MUST override this and pass correct global type id

Show Source Code

void ProjectionSpec::Init_PrjnState ( PrjnState_cpp* prjn, NetworkState_cpp* net )

initialize projection state -- for projections that have extra state variables

Show Source Code

int ProjectionSpec::ProbAddCons ( PrjnState_cpp* prjn, NetworkState_cpp* net, float p_add_con, float init_wt = 0.0 )

probabilistically add a proportion of new connections to replace those pruned previously, init_wt = initial weight value of new connection

Show Source Code

int ProjectionSpec::ProbAddCons_impl ( PrjnState_cpp* prjn, NetworkState_cpp* net, float p_add_con, float init_wt = 0.0 )

actual implementation: probabilistically add a proportion of new connections to replace those pruned previously, init_wt = initial weight value of new connection

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

bool ProjectionSpec::HasRandomScale ( )

does this projection spec set a randomized scale value -- by default this returns true when init_wts && set_scale is true -- other specs that do set_scale in a different way (e.g., a non-random topographic pattern) may yet return false in this case -- this has implications for saving the scale value with the weights file for example

Show Source Code

void ProjectionSpec::SetCnScale ( PrjnState_cpp* prjn, NetworkState_cpp* net, int thr_no, ConState_cpp* cg, int cn_idx, float scale_val )

set given connection number in con group to given scale value

Show Source Code

void ProjectionSpec::SetCnWt ( PrjnState_cpp* prjn, NetworkState_cpp* net, int thr_no, ConState_cpp* cg, int cn_idx, float wt_val )

set given connection number in con group to given weight value -- this implements the add_rnd_var flag to add random variance to weights if set

Show Source Code

void ProjectionSpec::SetCnWtRnd ( PrjnState_cpp* prjn, NetworkState_cpp* net, int thr_no, ConState_cpp* cg, int cn_idx )

set given connection number in con group to standard random weight value as specified in the connection spec

Show Source Code

void ProjectionSpec::SetCnWtScale ( PrjnState_cpp* prjn, NetworkState_cpp* net, int thr_no, ConState_cpp* cg, int cn_idx, float wt_val )

standard function for setting weight or scale value depending on relevant prjnspec params (set_scale) -- calls following functions:

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 ProjectionSpec::CheckConnect ( Projection* prjn, bool quiet )

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

void OneToOnePrjnSpec::ConnectRecvGp_impl ( PrjnState_cpp* prjn, NetworkState_cpp* net, int make_cons )

recv is using groups

Show Source Code

void OneToOnePrjnSpec::ConnectSendGp_impl ( PrjnState_cpp* prjn, NetworkState_cpp* net, int make_cons )

send is using groups

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

TypeDef* MarkerGpOneToOnePrjnSpec::GetTypeDef ( )

Show Source Code

bool BaseSpec::GetUnique ( taString& memb_nm )

check inherit bit

Show Source Code

void MarkerGpOneToOnePrjnSpec::Initialize_core ( )

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 ProjectionSpec::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: State

Expert Member Category: _NoCategory

Expert Member Category: taBase

Expert Methods

Expert Method Category: UserData


Expert Member Documentation

Expert Member Category: State

ProjectionSpec::spec_idx : int

index of this spec in list of prjn specs in network

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

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