Skip to content

Commit

Permalink
building!
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Oct 10, 2024
1 parent df9554b commit 00cfcfe
Show file tree
Hide file tree
Showing 51 changed files with 549 additions and 542 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ As of v1.8.0, _data parallel_ processing of multiple input patterns in parallel

```Go
net.InitExt(ctx) // clear any existing inputs
for di := uint32(0); di < ctx.NetIndexes.NData; di++ {
for di := uint32(0); di < ctx.NData; di++ {
ev.Step()
for _, lnm := range lays {
ly := ss.Net.AxonLayerByName(lnm)
Expand Down Expand Up @@ -128,7 +128,7 @@ func (ss *Sim) NetViewCounters(tm etime.Times) {
case time == etime.Trial:
trl := ss.Stats.Int("Trial")
row = trl
for di := 0; di < int(ctx.NetIndexes.NData); di++ {
for di := 0; di < int(ctx.NData); di++ {
ss.Stats.SetInt("Trial", trl+di)
ss.TrialStats(di)
ss.StatCounters(di)
Expand Down
22 changes: 16 additions & 6 deletions axon/act-path.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions axon/act-path.goal
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,29 @@ type SynComParams struct {
// type of conductance (G) communicated by this pathway
GType PathGTypes

// additional synaptic delay in msec for inputs arriving at this pathway. Must be <= MaxDelay which is set during network building based on MaxDelay of any existing Path in the network. Delay = 0 means a spike reaches receivers in the next Cycle, which is the minimum time (1 msec). Biologically, subtract 1 from biological synaptic delay values to set corresponding Delay value.
// additional synaptic delay in msec for inputs arriving at this pathway.
// Must be <= MaxDelay which is set during network building based on MaxDelay
// of any existing Path in the network. Delay = 0 means a spike reaches
// receivers in the next Cycle, which is the minimum time (1 msec).
// Biologically, subtract 1 from biological synaptic delay values to set
// corresponding Delay value.
Delay uint32 `min:"0" default:"2"`

// maximum value of Delay -- based on MaxDelay values when the BuildGBuf function was called when the network was built -- cannot set it longer than this, except by calling BuildGBuf on network after changing MaxDelay to a larger value in any pathway in the network.
// maximum value of Delay, based on MaxDelay values when the BuildGBuf
// function was called during [Network.Build]. Cannot set it longer than this,
// except by calling BuildGBuf on network after changing MaxDelay to a larger
// value in any pathway in the network.
MaxDelay uint32 `edit:"-"`

// probability of synaptic transmission failure -- if > 0, then weights are turned off at random as a function of PFail (times 1-SWt if PFailSwt)
// probability of synaptic transmission failure: if > 0, then weights are
//turned off at random as a function of PFail (times 1-SWt if PFailSwt).
PFail float32

// if true, then probability of failure is inversely proportional to SWt structural / slow weight value (i.e., multiply PFail * (1-SWt)))
// if true, then probability of failure is inversely proportional to SWt
// structural / slow weight value (i.e., multiply PFail * (1-SWt))).
PFailSWt slbool.Bool

// delay length = actual length of the GBuf buffer per neuron = Delay+1 -- just for speed
// delay length = actual length of the GBuf buffer per neuron = Delay+1; just for speed
DelLen uint32 `display:"-"`

pad, pad1 float32
Expand Down
2 changes: 1 addition & 1 deletion axon/act.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions axon/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func newTestNet(ctx *Context, nData int) *Network {
testNet.Rubicon.Defaults()

testNet.Build(ctx)
ctx.NetIndexes.NData = uint32(nData)
ctx.NData = uint32(nData)
testNet.Defaults()
testNet.ApplyParams(ParamSets["Base"], false) // false) // true) // no msg
testNet.InitWeights(ctx) // get GScale here
Expand All @@ -131,7 +131,7 @@ func newTestNetFull(ctx *Context, nData int) *Network {
testNet.ConnectLayers(outLay, hidLay, full, BackPath)

testNet.Build(ctx)
ctx.NetIndexes.NData = uint32(nData)
ctx.NData = uint32(nData)
testNet.Defaults()
testNet.ApplyParams(ParamSets["Base"], false) // false) // true) // no msg
testNet.InitWeights(ctx) // get GScale here
Expand Down Expand Up @@ -563,7 +563,7 @@ func NetDebugAct(t *testing.T, printValues bool, gpu bool, nData int, initWts bo
// fine-grained diff test, e.g., see the GPU version.
func RunDebugAct(t *testing.T, ctx *Context, testNet *Network, printValues bool, gpu bool, initWts bool) map[string]float32 {

nData := int(ctx.NetIndexes.NData)
nData := int(ctx.NData)
valMap := make(map[string]float32)
inPats := newInPats()
inLay := testNet.LayerByName("Input")
Expand Down Expand Up @@ -1025,7 +1025,7 @@ func NetDebugLearn(t *testing.T, printValues bool, gpu bool, maxData, nData int,
testNet.ApplyParams(ParamSets["SubMean"], false)
}

ctx.NetIndexes.NData = uint32(nData)
ctx.NData = uint32(nData)
return RunDebugLearn(t, ctx, testNet, printValues, gpu, initWts, slowAdapt)
}

Expand All @@ -1034,7 +1034,7 @@ func NetDebugLearn(t *testing.T, printValues bool, gpu bool, maxData, nData int,
// fine-grained diff test, e.g., see the GPU version.
func RunDebugLearn(t *testing.T, ctx *Context, testNet *Network, printValues bool, gpu bool, initWts, slowAdapt bool) map[string]float32 {

nData := int(ctx.NetIndexes.NData)
nData := int(ctx.NData)
valMap := make(map[string]float32)
inPats := newInPats()
inLay := testNet.LayerByName("Input")
Expand Down
Loading

0 comments on commit 00cfcfe

Please sign in to comment.