Skip to content

Commit

Permalink
more name updates, generate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Aug 11, 2024
1 parent 38ab689 commit e359c2b
Show file tree
Hide file tree
Showing 56 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion axon/rl_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (nt *Network) AddClampDaLayer(name string) *Layer {
}

// AddTDLayers adds the standard TD temporal differences layers, generating a DA signal.
// Projection from Rew to RewInteg is given class TDRewToInteg -- should
// Pathway from Rew to RewInteg is given class TDRewToInteg -- should
// have no learning and 1 weight.
func (nt *Network) AddTDLayers(prefix string, rel relpos.Relations, space float32) (rew, rp, ri, td *Layer) {
rew = nt.AddRewLayer(prefix + "Rew")
Expand Down
2 changes: 1 addition & 1 deletion axon/typegen.go

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

8 changes: 4 additions & 4 deletions examples/attn_trn/attn.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,10 @@ func (ss *Sim) Stopped() {
}
}
// SaveWts saves the network weights -- when called with views.CallMethod
// SaveWeights saves the network weights -- when called with views.CallMethod
// it will auto-prompt for filename
func (ss *Sim) SaveWts(filename core.Filename) {
ss.Net.SaveWtsJSON(filename)
func (ss *Sim) SaveWeights(filename core.Filename) {
ss.Net.SaveWeightsJSON(filename)
}
////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1091,7 +1091,7 @@ func (ss *Sim) ConfigGUI() *core.Window {
// These props register Save methods so they can be used
var SimProps = tree.Props{
"CallMethods": tree.PropSlice{
{"SaveWts", tree.Props{
{"SaveWeights", tree.Props{
"desc": "save network weights to file",
"icon": "file-save",
"Args": tree.PropSlice{
Expand Down
10 changes: 5 additions & 5 deletions examples/choose/choose.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func (ss *Sim) ConfigLoops() {
// Save weights to file, to look at later
man.GetLoop(etime.Train, etime.Run).OnEnd.Add("SaveWeights", func() {
ctrString := ss.Stats.PrintValues([]string{"Run", "Epoch"}, []string{"%03d", "%05d"}, "_")
axon.SaveWeightsIfConfigSet(ss.Net, ss.Config.Log.SaveWts, ctrString, ss.Stats.String("RunName"))
axon.SaveWeightsIfConfigSet(ss.Net, ss.Config.Log.SaveWeights, ctrString, ss.Stats.String("RunName"))
})

man.GetLoop(etime.Train, etime.Epoch).OnEnd.Add("PctCortex", func() {
Expand Down Expand Up @@ -678,9 +678,9 @@ func (ss *Sim) NewRun() {
ss.InitStats()
ss.StatCounters(0)
ss.Logs.ResetLog(etime.Train, etime.Epoch)
if ss.Config.OpenWts != "" {
ss.Net.OpenWtsJSON(core.Filename(ss.Config.OpenWts))
log.Println("Opened weights:", ss.Config.OpenWts)
if ss.Config.OpenWeights != "" {
ss.Net.OpenWeightsJSON(core.Filename(ss.Config.OpenWeights))
log.Println("Opened weights:", ss.Config.OpenWeights)
}
}

Expand Down Expand Up @@ -1443,7 +1443,7 @@ func (ss *Sim) RunNoGUI() {
if ss.Config.Params.Note != "" {
mpi.Printf("Note: %s\n", ss.Config.Params.Note)
}
if ss.Config.Log.SaveWts {
if ss.Config.Log.SaveWeights {
mpi.Printf("Saving final weights per run\n")
}
runName := ss.Params.RunName(ss.Config.Run.Run)
Expand Down
4 changes: 2 additions & 2 deletions examples/choose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type RunConfig struct {
type LogConfig struct {

// if true, save final weights after each run
SaveWts bool
SaveWeights bool

// if true, save train epoch log to file, as .epc.tsv typically
Epoch bool `default:"true" nest:"+"`
Expand Down Expand Up @@ -140,7 +140,7 @@ type Config struct {
Debug bool

// if set, open given weights file at start of training
OpenWts string
OpenWeights string

// environment configuration options
Env EnvConfig `display:"add-fields"`
Expand Down
Loading

0 comments on commit e359c2b

Please sign in to comment.