Skip to content

Commit

Permalink
dwt building
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Nov 2, 2024
1 parent c80c92b commit a7a3dc6
Show file tree
Hide file tree
Showing 12 changed files with 347 additions and 420 deletions.
File renamed without changes.
File renamed without changes.
32 changes: 0 additions & 32 deletions axon/layer-cpu.go

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

32 changes: 0 additions & 32 deletions axon/layer-cpu.goal
Original file line number Diff line number Diff line change
Expand Up @@ -350,38 +350,6 @@ func (ly *Layer) PhaseDiffFromActs(ctx *Context) {
//////////////////////////////////////////////////////////////////////////////////////
// Learning

// DWt computes the weight change (learning), based on
// synaptically integrated spiking, computed at the Theta cycle interval.
// This is the trace version for hidden units, and uses syn CaP - CaD for targets.
func (ly *Layer) DWt(ctx *Context, si uint32) {
for _, pj := range ly.SendPaths {
if pj.Off {
continue
}
pj.DWt(ctx, si)
}
}

// DWtSubMean computes subtractive normalization of the DWts
func (ly *Layer) DWtSubMean(ctx *Context, ri uint32) {
for _, pj := range ly.RecvPaths {
if pj.Off {
continue
}
pj.DWtSubMean(ctx, ri)
}
}

// WtFromDWt updates weight values from delta weight changes
func (ly *Layer) WtFromDWt(ctx *Context, si uint32) {
for _, pj := range ly.SendPaths {
if pj.Off {
continue
}
pj.WtFromDWt(ctx, si)
}
}

// DTrgSubMean subtracts the mean from DTrgAvg values
// Called by TrgAvgFromD
func (ly *Layer) DTrgSubMean(ctx *Context) {
Expand Down
3 changes: 1 addition & 2 deletions axon/learn.go

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

3 changes: 1 addition & 2 deletions axon/learn.goal
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ func (tp *TraceParams) Update() {
// TrFromCa returns updated trace factor as function of a
// synaptic calcium update factor and current trace
func (tp *TraceParams) TrFromCa(tr float32, ca float32) float32 {
tr += tp.Dt * (ca - tr)
return tr
return tr + tp.Dt*(ca-tr)
}

//////////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading

0 comments on commit a7a3dc6

Please sign in to comment.