Code Monkey home page Code Monkey logo

emer / leabra Goto Github PK

View Code? Open in Web Editor NEW
72.0 72.0 21.0 33.89 MB

Go implementation of Leabra algorithm for biologically-based models of cognition, based on emergent framework (with Python interface)

Home Page: https://emersim.org

License: BSD 3-Clause "New" or "Revised" License

Go 67.17% Makefile 0.50% Python 32.33%
artificial-intelligence artificial-neural-networks cognitive-neuroscience cognitive-science computational-neuroscience emergent go golang neural-network

leabra's People

Contributors

rcoreilly avatar rgobbel avatar rohrlich avatar stephenjread avatar zycyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

leabra's Issues

Instructions about nogui should note that sims cannot be run nogui without modification

Given that the various web pages encourage people to use some of the sims as potential starting points for projects, it would be good to explicitly note that while the ra25 project can be run nogui, the sims cannot because they lack the necessary code.

In hindsight it is obvious, but the ability to run nogui is not a general characteristics of an emergent program, but instead requires something like the specific code found in the ra25 project.

confirm XCAL check-mark equations with plot

it's been a while -- double-check.

also, add note in README about AvgSLrn and how extensive experiments with different rate constants wasn't able to match performance of current setup.

`etable.py` needs `from leabra import env`

After adding a call to self.ConfigPats() in the ra25.py demo project (from .../leabra/examples/ra25/) entering into the function call patgen.PermutedBinaryRows(dt.Cols[1], 6, 1, 0) (~line 766) ends up in etable.py where env is a missing variable. When I add the from' line locally and then did .../leabra/python/make install' (Important: do not do a make since that appears to restore the env-less version) it appears to fix the problem, only to seg fault further downstream (see .../emer/leabra/ Issue #1).

env.py, line 378 causes Seg fault

The last line included in the block below appears to cause a seg fault:

# Python type for struct env.FixedTable
class FixedTable(go.GoClass):
  """FixedTable is a basic Env that manages patterns from an etable.Table, with\neither sequential or permuted random ordering, and uses standard Trial / Epoch\nTimeScale counters to record progress and iterations through the table.\nIt also records the outer loop of Run as provided by the model.\nIt uses an IdxView indexed view of the Table, so a single shared table\ncan be used across different environments, with each having its own unique view.\n"""
  def __init__(self, *args, **kwargs):
    """
    handle=A Go-side object is always initialized with an explicit handle=arg
    otherwise parameters can be unnamed in order of field names or named fields
    in which case a new Go object is constructed first
    """
    if len(kwargs) == 1 and 'handle' in kwargs:
      self.handle = kwargs['handle']
    elif len(args) == 1 and isinstance(args[0], go.GoClass):
      self.handle = args[0].handle
    else:
      self.handle = _leabra.env_FixedTable_CTor() # line 378, env.py

Here is the log message after entering this statement while debugging in VSCode:

thazy@macbookpro ~/go/src/github.com/thazy/leabra_demo/ra25/pyra25$ pyleabra -i ra25.py
OpenGL version 4.1 NVIDIA-12.0.24 355.11.10.50.10.103
Waiting for debugger attach
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x503e400]

goroutine 36 [running]:
main.etable_IdxView_Idxs_Get(0xffffffffffffffff, 0x5a3f960)
        /Users/thazy/go/src/github.com/emer/leabra/python/leabra/leabra.go:29395 +0x30
main._cgoexpwrap_a5bdb2a0ec34_etable_IdxView_Idxs_Get(0xffffffffffffffff, 0x17e5c480)
        _cgo_gotypes.go:37142 +0x2b
main._Cfunc_Py_Main(0x3, 0xc00000c020, 0xc000000000)
        _cgo_gotypes.go:675 +0x4d
main.GoPyMainRun.func2(0x3, 0xc00000c020, 0x2)
        /Users/thazy/go/src/github.com/emer/leabra/python/leabra/leabra.go:227 +0xbd
main.GoPyMainRun()
        /Users/thazy/go/src/github.com/emer/leabra/python/leabra/leabra.go:227 +0x190
main.main.func1()
        /Users/thazy/go/src/github.com/emer/leabra/python/leabra/leabra.go:162 +0x20
github.com/goki/gi/gimain.Main.func1(0x5cdc160, 0x791ae60)
        /Users/thazy/go/src/github.com/goki/gi/gimain/gimain.go:30 +0x24
github.com/goki/gi/oswin/driver/glos.Main.func1()
        /Users/thazy/go/src/github.com/goki/gi/oswin/driver/glos/app.go:88 +0x40
created by github.com/goki/gi/oswin/driver/glos.Main
        /Users/thazy/go/src/github.com/goki/gi/oswin/driver/glos/app.go:87 +0x87
thazy@macbookpro ~/go/src/github.com/thazy/leabra_demo/ra25/pyra25$ 

Got here by calling self.ConfigPats() in ra25.py (from ../leabra/examples/ra25/); NOTE: etable.py also needs from leabra import env to get to env.py (also filed as a separate. issue)

Mistake in ra25 code

The current code for ra25 has a simple mistake in the code for the ConfigPats and the OpenPats function copied below. The ConfigPats saves the generated file with the .csv extension and the etable.Comma setting, whereas the OpenPats function opens the file with the .tsv extension and the etable.Tab setting. Presumably they should be consistent. I had an issue where I used ConfigPats to generate the structure of my training data and then tried to use the OpenPats command to read in the training data later, which didn't work. It failed to find the file. When I made them consistent, everything was fine.

func (ss *Sim) ConfigPats() {
dt := ss.Pats
dt.SetMetaData("name", "TrainPats")
dt.SetMetaData("desc", "Training patterns")
sch := etable.Schema{
{"Name", etensor.STRING, nil, nil},
{"Input", etensor.FLOAT32, []int{5, 5}, []string{"Y", "X"}},
{"Output", etensor.FLOAT32, []int{5, 5}, []string{"Y", "X"}},
}
dt.SetFromSchema(sch, 25)

patgen.PermutedBinaryRows(dt.Cols[1], 6, 1, 0)
patgen.PermutedBinaryRows(dt.Cols[2], 6, 1, 0)
dt.SaveCSV("random_5x5_25_gen.csv", etable.Comma, etable.Headers)

}

func (ss *Sim) OpenPats() {
dt := ss.Pats
dt.SetMetaData("name", "TrainPats")
dt.SetMetaData("desc", "Training patterns")
err := dt.OpenCSV("random_5x5_25.tsv", etable.Tab)
if err != nil {
log.Println(err)
}
}

slice bounds out of range error in hip and hip_bench

When training running through the last epoch, it shows the attached error. I believe it's caused by ss.logrun function.

panic: runtime error: slice bounds out of range [1:0]

goroutine 45 [running]:
main.(*Sim).LogRun(0x2a64240, 0xc0009ab770)
C:/Users/Liu/OneDrive/UCD_Neuroscience/Modeling/leabra/examples/hip/hip.go:1527 +0x9d8
main.(*Sim).RunEnd(0x2a64240)
C:/Users/Liu/OneDrive/UCD_Neuroscience/Modeling/leabra/examples/hip/hip.go:645 +0x45
main.(*Sim).TrainTrial(0x2a64240)
C:/Users/Liu/OneDrive/UCD_Neuroscience/Modeling/leabra/examples/hip/hip.go:626 +0x1f2
main.(*Sim).TrainRun(0x2a64240)
C:/Users/Liu/OneDrive/UCD_Neuroscience/Modeling/leabra/examples/hip/hip.go:794 +0x45
created by main.(*Sim).ConfigGui.func12
C:/Users/Liu/OneDrive/UCD_Neuroscience/Modeling/leabra/examples/hip/hip.go:1736 +0x76

stty behaviour, pyleabra

I compiled the pyleabra binary from the current version on the ra25.py example. I get a seemingly working GUI and a Python REPL. After quitting both (and confirming that no left-behind process is running), my bash terminal no longer echoes characters typed. Reproduced in X-forwarded sessions on two separate systems. ra25 compiled from go source does not yield this behaviour.

(stty sane resets to normal behaviour, but it seems noteworthy.)

[edit: Python 3.8.5, go 1.13]

ra25 runtime error on Windows 10

Hi there,

I've been following the installation instructions in order to get Leabra working on Windows 10. But when I try to run the ra25 example simulation (after compiling it with no issues), the following runtime error appears:

NThreads: 1     go max procs: 6 num cpu:6
Exception 0xc0000005 0x0 0x0 0x7ffd650389aa
PC=0x7ffd650389aa
signal arrived during external code execution

runtime.cgocall(0x7ff66bd208d0, 0xc0007ed800)
        C:/Program Files/Go/src/runtime/cgocall.go:157 +0x3e fp=0xc0007ed7d8 sp=0xc0007ed7a0 pc=0x7ff66ad0939e
github.com/goki/vulkan._Cfunc_callVkCreateDescriptorPool(0x217218c0218, 0x217211fc580, 0x0, 0xc0007de1b0)
        _cgo_gotypes.go:8255 +0x55 fp=0xc0007ed800 sp=0xc0007ed7d8 pc=0x7ff66b0a6115
github.com/goki/vulkan.CreateDescriptorPool.func1(0x217218c0218, 0x217211fc580, 0x0, 0xc0007de1b0)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vulkan.go:734 +0xb1 fp=0xc0007ed840 sp=0xc0007ed800 pc=0x7ff66b0d7711
github.com/goki/vulkan.CreateDescriptorPool(0x217218c0218, 0xc0001fd0e0?, 0x0, 0xc0007de1b0)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vulkan.go:734 +0x45 fp=0xc0007ed878 sp=0xc0007ed840 pc=0x7ff66b0d7625
github.com/goki/vgpu/vgpu.(*Vars).DescLayout(0xc0002d67c8, 0x217218c0218)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vgpu/vars.go:320 +0x410 fp=0xc0007edaa0 sp=0xc0007ed878 pc=0x7ff66b1263d0
github.com/goki/vgpu/vgpu.(*Vars).Config(0xc0002d67c8)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vgpu/vars.go:169 +0x1cb fp=0xc0007edbb0 sp=0xc0007edaa0 pc=0x7ff66b1254cb
github.com/goki/vgpu/vgpu.(*Memory).Config(0xc0002d6798, 0x7ff66b129506?)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vgpu/memory.go:100 +0x2b fp=0xc0007edbd8 sp=0xc0007edbb0 pc=0x7ff66b11326b
github.com/goki/vgpu/vgpu.(*System).Config(0xc0002d6710)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vgpu/system.go:267 +0x34 fp=0xc0007edc48 sp=0xc0007edbd8 pc=0x7ff66b11ff74
github.com/goki/vgpu/vdraw.(*Drawer).ConfigSys(0xc0002d6710)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vdraw/config.go:106 +0x988 fp=0xc0007eddc0 sp=0xc0007edc48 pc=0x7ff66b12e808
github.com/goki/vgpu/vdraw.(*Drawer).ConfigSurface(0xc0002d6710, 0xc00059a370, 0xc00089d930?)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/vdraw/vdraw.go:51 +0xaf fp=0xc0007ede00 sp=0xc0007eddc0 pc=0x7ff66b130b0f
github.com/goki/gi/oswin/driver/vkos.(*appImpl).NewWindow.func2()
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:249 +0x127 fp=0xc0007ede80 sp=0xc0007ede00 pc=0x7ff66bc6ec87
github.com/goki/gi/oswin/driver/vkos.(*appImpl).mainLoop(0x7ff66c4952e0)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:159 +0x102 fp=0xc0007edf00 sp=0xc0007ede80 pc=0x7ff66bc6da82
github.com/goki/gi/oswin/driver/vkos.Main(0x7ff66e6d4480?)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:81 +0x96 fp=0xc0007edf18 sp=0xc0007edf00 pc=0x7ff66bc6d5b6
github.com/goki/gi/oswin/driver.driverMain(...)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/driver_vkos.go:18
github.com/goki/gi/oswin/driver.Main(...)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/driver.go:27
github.com/goki/gi/gimain.Main(0x7ff66d832ad0)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/gimain/gimain.go:31 +0x50 fp=0xc0007edf38 sp=0xc0007edf18 pc=0x7ff66bd15eb0
main.main()
        C:/Users/Public/leabra/examples/ra25/ra25.go:48 +0x4a fp=0xc0007edf50 sp=0xc0007edf38 pc=0x7ff66bd19dca
runtime.main()
        C:/Program Files/Go/src/runtime/proc.go:271 +0x28b fp=0xc0007edfe0 sp=0xc0007edf50 pc=0x7ff66ad42aab
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0007edfe8 sp=0xc0007edfe0 pc=0x7ff66ad752c1

goroutine 2 gp=0xc00005a700 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00005dfa8 sp=0xc00005df88 pc=0x7ff66ad42eae
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:408
runtime.forcegchelper()
        C:/Program Files/Go/src/runtime/proc.go:326 +0xb8 fp=0xc00005dfe0 sp=0xc00005dfa8 pc=0x7ff66ad42d38
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00005dfe8 sp=0xc00005dfe0 pc=0x7ff66ad752c1
created by runtime.init.6 in goroutine 1
        C:/Program Files/Go/src/runtime/proc.go:314 +0x1a

goroutine 3 gp=0xc00005aa80 m=nil [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00005ff80 sp=0xc00005ff60 pc=0x7ff66ad42eae
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:408
runtime.bgsweep(0xc00003a070)
        C:/Program Files/Go/src/runtime/mgcsweep.go:318 +0xdf fp=0xc00005ffc8 sp=0xc00005ff80 pc=0x7ff66ad2ba5f
runtime.gcenable.gowrap1()
        C:/Program Files/Go/src/runtime/mgc.go:203 +0x25 fp=0xc00005ffe0 sp=0xc00005ffc8 pc=0x7ff66ad20325
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x7ff66ad752c1
created by runtime.gcenable in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:203 +0x66

goroutine 4 gp=0xc00005ac40 m=nil [GC scavenge wait]:
runtime.gopark(0x10000?, 0x7ff66da24d30?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00006ff78 sp=0xc00006ff58 pc=0x7ff66ad42eae
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:408
runtime.(*scavengerState).park(0x7ff66e6d1b80)
        C:/Program Files/Go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc00006ffa8 sp=0xc00006ff78 pc=0x7ff66ad29409
runtime.bgscavenge(0xc00003a070)
        C:/Program Files/Go/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc00006ffc8 sp=0xc00006ffa8 pc=0x7ff66ad299b9
runtime.gcenable.gowrap2()
        C:/Program Files/Go/src/runtime/mgc.go:204 +0x25 fp=0xc00006ffe0 sp=0xc00006ffc8 pc=0x7ff66ad202c5
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00006ffe8 sp=0xc00006ffe0 pc=0x7ff66ad752c1
created by runtime.gcenable in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:204 +0xa5

goroutine 5 gp=0xc00005b180 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0xc000042030?, 0x0?, 0xc0?, 0x1000000010?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc000061e20 sp=0xc000061e00 pc=0x7ff66ad42eae
runtime.runfinq()
        C:/Program Files/Go/src/runtime/mfinal.go:194 +0x107 fp=0xc000061fe0 sp=0xc000061e20 pc=0x7ff66ad1f3a7
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000061fe8 sp=0xc000061fe0 pc=0x7ff66ad752c1
created by runtime.createfing in goroutine 1
        C:/Program Files/Go/src/runtime/mfinal.go:164 +0x3d

goroutine 18 gp=0xc0000841c0 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00006bf50 sp=0xc00006bf30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00006bfe0 sp=0xc00006bf50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00006bfe8 sp=0xc00006bfe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 19 gp=0xc000084380 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00006df50 sp=0xc00006df30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00006dfe0 sp=0xc00006df50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00006dfe8 sp=0xc00006dfe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 20 gp=0xc000084540 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc000433f50 sp=0xc000433f30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc000433fe0 sp=0xc000433f50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000433fe8 sp=0xc000433fe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 6 gp=0xc00005b500 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc000071f50 sp=0xc000071f30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc000071fe0 sp=0xc000071f50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000071fe8 sp=0xc000071fe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 21 gp=0xc000084700 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc000435f50 sp=0xc000435f30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc000435fe0 sp=0xc000435f50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc000435fe8 sp=0xc000435fe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 34 gp=0xc000482000 m=nil [GC worker (idle)]:
runtime.gopark(0xa583c803984c8?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc00042ff50 sp=0xc00042ff30 pc=0x7ff66ad42eae
runtime.gcBgMarkWorker()
        C:/Program Files/Go/src/runtime/mgc.go:1310 +0xe5 fp=0xc00042ffe0 sp=0xc00042ff50 pc=0x7ff66ad22465
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc00042ffe8 sp=0xc00042ffe0 pc=0x7ff66ad752c1
created by runtime.gcBgMarkStartWorkers in goroutine 1
        C:/Program Files/Go/src/runtime/mgc.go:1234 +0x1c

goroutine 7 gp=0xc0004821c0 m=nil [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc0006e5ea0 sp=0xc0006e5e80 pc=0x7ff66ad42eae
runtime.chanrecv(0xc000078240, 0xc0006e5fa8, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x3cd fp=0xc0006e5f18 sp=0xc0006e5ea0 pc=0x7ff66ad0ba2d
runtime.chanrecv2(0x0?, 0x0?)
        C:/Program Files/Go/src/runtime/chan.go:447 +0x12 fp=0xc0006e5f40 sp=0xc0006e5f18 pc=0x7ff66ad0b652
github.com/emer/leabra/leabra.(*NetworkStru).ThrWorker(0xc0000c4700, 0x0)
        C:/Users/Public/leabra/leabra/networkstru.go:716 +0xab fp=0xc0006e5fc0 sp=0xc0006e5f40 pc=0x7ff66bc541ab
github.com/emer/leabra/leabra.(*NetworkStru).StartThreads.gowrap1()
        C:/Users/Public/leabra/leabra/networkstru.go:700 +0x25 fp=0xc0006e5fe0 sp=0xc0006e5fc0 pc=0x7ff66bc54045
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0006e5fe8 sp=0xc0006e5fe0 pc=0x7ff66ad752c1
created by github.com/emer/leabra/leabra.(*NetworkStru).StartThreads in goroutine 1
        C:/Users/Public/leabra/leabra/networkstru.go:700 +0xe7

goroutine 8 gp=0xc000482540 m=nil [chan receive]:
runtime.gopark(0xc0002960c0?, 0x217596bd128?, 0x60?, 0x0?, 0x217596b0108?)
        C:/Program Files/Go/src/runtime/proc.go:402 +0xce fp=0xc0005f1940 sp=0xc0005f1920 pc=0x7ff66ad42eae
runtime.chanrecv(0xc0000789c0, 0x0, 0x1)
        C:/Program Files/Go/src/runtime/chan.go:583 +0x3cd fp=0xc0005f19b8 sp=0xc0005f1940 pc=0x7ff66ad0ba2d
runtime.chanrecv1(0xc0005f1a08?, 0x0?)
        C:/Program Files/Go/src/runtime/chan.go:442 +0x12 fp=0xc0005f19e0 sp=0xc0005f19b8 pc=0x7ff66ad0b632
github.com/goki/gi/oswin/driver/vkos.(*appImpl).RunOnMain(0x7ff66c4952e0, 0xc000308000)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:97 +0x72 fp=0xc0005f1a18 sp=0xc0005f19e0 pc=0x7ff66bc6d652
github.com/goki/gi/oswin/driver/vkos.(*appImpl).NewWindow(0x7ff66c4952e0, 0xc00060a400?)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:242 +0x3ce fp=0xc0005f1ae8 sp=0xc0005f1a18 pc=0x7ff66bc6e40e
github.com/goki/gi/gi.NewWindow({0x7ff66c7b0888, 0x4}, {0x7ff66c7dca2f, 0x18}, 0xc00060a400)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/gi/window.go:345 +0x129 fp=0xc0005f1b48 sp=0xc0005f1ae8 pc=0x7ff66b39b529
github.com/goki/gi/gi.NewMainWindow({0x7ff66c7b0888, 0x4}, {0x7ff66c7dca2f, 0x18}, 0x640, 0x4b0)
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/gi/window.go:393 +0x138 fp=0xc0005f1ba0 sp=0xc0005f1b48 pc=0x7ff66b39b978
github.com/emer/emergent/egui.(*GUI).MakeWindow(0x7ff66e6d4ca8, {0x7ff66c7151a0, 0x7ff66e6d4480}, {0x7ff66c7b0888, 0x4}, {0x7ff66c7dca2f, 0x18}, {0x7ff66c81187e, 0x72})
        C:/Users/bdkn9463/go/pkg/mod/github.com/emer/[email protected]/egui/gui.go:67 +0xd2 fp=0xc0005f1c18 sp=0xc0005f1ba0 pc=0x7ff66bd0ab52
main.(*Sim).ConfigGui(0x7ff66e6d4480)
        C:/Users/Public/leabra/examples/ra25/ra25.go:776 +0x6b fp=0xc0005f1f88 sp=0xc0005f1c18 pc=0x7ff66bd1d5cb
main.guirun()
        C:/Users/Public/leabra/examples/ra25/ra25.go:56 +0x26 fp=0xc0005f1fa0 sp=0xc0005f1f88 pc=0x7ff66bd19e06
main.main.func1()
        C:/Users/Public/leabra/examples/ra25/ra25.go:49 +0xf fp=0xc0005f1fb0 sp=0xc0005f1fa0 pc=0x7ff66bd1f2cf
github.com/goki/gi/gimain.Main.func1({0x0?, 0x0?})
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/gimain/gimain.go:32 +0x13 fp=0xc0005f1fc0 sp=0xc0005f1fb0 pc=0x7ff66bd15ef3
github.com/goki/gi/oswin/driver/vkos.Main.func1()
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:78 +0x28 fp=0xc0005f1fe0 sp=0xc0005f1fc0 pc=0x7ff66bc76628
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_amd64.s:1695 +0x1 fp=0xc0005f1fe8 sp=0xc0005f1fe0 pc=0x7ff66ad752c1
created by github.com/goki/gi/oswin/driver/vkos.Main in goroutine 1
        C:/Users/bdkn9463/go/pkg/mod/github.com/goki/[email protected]/oswin/driver/vkos/app.go:77 +0x8a
rax     0x0
rbx     0x0
rcx     0x217218c2230
rdx     0x10
rdi     0x217218c2230
rsi     0x217218c21d0
rbp     0x6c0b7ff7c0
rsp     0x6c0b7ff480
r8      0x40
r9      0x1
r10     0x0
r11     0x20fffcfadeefbb01
r12     0x40
r13     0x80
r14     0x10
r15     0x0
rip     0x7ffd650389aa
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b

A very similar error popped up when I tried running the widgets example during the GoGi installation process.

Judging from a quick glance at this error message, it seems like maybe the issue is related to Vulkan somehow? I did try to do a fresh installation of the Vulkan SDK, but unfortunately the error persisted. I also saw some recent discussion about an outdated go.mod file in the Github issues, but I'm not sure if it applies to me since I've been using the latest versions of the Leabra files (as of 3/29/24).

Node indices in Netview are flipped from indices in input files

I just noticed that when you hover over a node in Netview and it gives you the indices of that node, the values don't match the indices specified in a training data table. For example, node 0,1 in a training data table corresponds to node 1,0 in the Netview.

self.ConfigPats() call in ra25.py causes hangup so GUI doesn't open

Using a fresh copy of ra25.py pyleabra -i ra25.py opens and runs correctly. Replacing self.OpenPats() with self.ConfigPats() (in self.Config()) causes a hang so that the GUI doesn't open. The log message shows something about a missing handle in the _leabra built-in module:

thazy@macbookpro ~/go/src/github.com/thazy/leabra_demo/ra25$ pyleabra -i ra25.py 
OpenGL version 4.1 NVIDIA-12.0.24 355.11.10.50.10.103
Traceback (most recent call last):
  File "ra25.py", line 1393, in <module>
    main(sys.argv[1:])
  File "ra25.py", line 1337, in main
    TheSim.Config()
  File "ra25.py", line 339, in Config
    self.ConfigPats()
  File "ra25.py", line 766, in ConfigPats
    patgen.PermutedBinaryRows(dt.Cols[1], 6, 1, 0)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/leabra/patgen.py", line 67, in PermutedBinaryRows
    _leabra.patgen_PermutedBinaryRows(tsr.handle, nOn, onVal, offVal, goRun)
AttributeError: 'int' object has no attribute 'handle'

leabra.Prjn does not implement emer.Prjn properly

Looks like the return types on three methods are not right. Replacing lines 64-67 of leabra/prjn.go seems to fix it:

func (pj *Prjn) SetClass(cls string)          { pj.Cls = cls }
func (pj *Prjn) SetPattern(pat prjn.Pattern) emer.Prjn { pj.Pat = pat; return pj }
func (pj *Prjn) SetType(typ emer.PrjnType)    { pj.Typ = typ }

I've also started using this pattern to verify that my code is implementing interfaces correctly:

 var _ emer.Prjn = (*Prjn)(nil) // for verification that the struct implements the interface

TD algorithm not reflecting negative externally-delivered reinforcements (i.e., NegPV)

In td.go file of pbwm package, the function on the RewInteg layer does not reflect NegPV values clamped on the Rew layer. Note how plus phase Act takes only nrn.Ge value as its current Reward value, which presumably reflects the net input fm Reward layer only and Ge is positive-rectified? Here is the relevant function:

func (ly *TDRewIntegLayer) ActFmG(ltime leabra.Time) {
rply, _ := ly.RewPredLayer()
if rply == nil {
return
}
rpActP := rply.Neurons[0].ActP
rpAct := rply.Neurons[0].Act
for ni := range ly.Neurons {
nrn := &ly.Neurons[ni]
if nrn.IsOff() {
continue
}
if ltime.Quarter == 3 { // plus phase
nrn.Act = nrn.Ge + ly.RewInteg.Discount
rpAct
} else {
nrn.Act = rpActP // previous actP
}
}
}

Main window for ra25 is misbehaving

I just updated to the newest version of gi and then updated leabra. When I started ra25 the main window opened up at several multiple widths of the size of my main external monitor. When I clicked the green button in the upper left, it then went full screen mode and fit in the external monitor. But when I then clicked the green button again, the window went totally black and expanded to many times larger than my external monitor.

Emergent v1.4.31 seems to break Leabra

Hi there,

I'm currently setting up a new model in a separate directory outside the main Leabra folder. When I initially tried to compile it, I got these errors:

# github.com/emer/leabra/leabra
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:167:45: not enough arguments in call to ly.LeabraLay.UnitVal1D
        have (int, int)
        want (int, int, int)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:190:37: not enough arguments in call to ly.LeabraLay.UnitVal1D
        have (int, int)
        want (int, int, int)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:232:37: not enough arguments in call to ly.LeabraLay.UnitVal1D
        have (int, int)
        want (int, int, int)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:250:38: not enough arguments in call to ly.LeabraLay.UnitVal1D
        have (int, int)
        want (int, int, int)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:360:26: cannot use ly (variable of type *Layer) as emer.Layer value in argument to emer.SendNameTry: *Layer does not implement emer.Layer (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:363:30: cannot use ly (variable of type *Layer) as emer.Layer value in argument to emer.SendNameTypeTry: *Layer does not implement emer.Layer (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:366:26: cannot use ly (variable of type *Layer) as emer.Layer value in argument to emer.RecvNameTry: *Layer does not implement emer.Layer (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\layer.go:369:30: cannot use ly (variable of type *Layer) as emer.Layer value in argument to emer.RecvNameTypeTry: *Layer does not implement emer.Layer (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\network.go:43:9: cannot use &Layer{} (value of type *Layer) as emer.Layer value in return statement: *Layer does not implement emer.Layer (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\network.go:48:9: cannot use &Prjn{} (value of type *Prjn) as emer.Prjn value in return statement: *Prjn does not implement emer.Prjn (missing method AddClass)
..\..\bdkn9463\go\pkg\mod\github.com\emer\[email protected]\leabra\network.go:48:9: too many errors

The go.mod file that I initially generated set the required Emergent version to v1.4.31, but the compilation errors went away when I set it back to v1.3.53 (the version specified in the Leabra repository's go.mod file). This was just something I tried randomly, and I'm not sure why it worked.

ra25 can't find file

I recently reinstalled everything starting with Go 1.13.5 and then rebuilt ra25. Now when I go to run ra25 I get the following message, despite the fact that the “missing" file is in the same directory as the binary. Ra25 opens, but when I try to initialize it, it crashes. Is it a problem with the path? I get the same problem when I try to run the binary from the ra25 examples folder. It used to work before I reinstalled a version of go that uses go.mod.

(base) StephenReadsMBP:~ read$ /Users/read/go/bin/ra25 ; exit;
2020/01/12 16:25:48 open random_5x5_25.tsv: no such file or directory
2020/01/12 16:25:48 open random_5x5_25.tsv: no such file or directory
OpenGL version 4.1 INTEL-12.10.14

Panic during network activation update

Clicking on a different tab of simulation GUI has sometimes caused a panic in updating the UI but this is the first time I've seen this stack trace.

runtime.fatalpanic at panic.go:847
runtime.gopanic at panic.go:722
sync.(*WaitGroup).Wait at waitgroup.go:132
github.com/emer/leabra/leabra.(*NetworkStru).ThrLayFun at networkstru.go:622
github.com/emer/leabra/leabra.(*Network).SendGDelta at network.go:168
github.com/emer/leabra/leabra.(*Network).Cycle at network.go:157
github.com/emer/leabra/deep.(*Network).Cycle at network.go:126
main.(*Sim).AlphaCyc at audonly.go:575
main.(*Sim).TrainTrial at audonly.go:701
main.(*Sim).Train at audonly.go:1024
runtime.goexit at asm_amd64.s:1357

  • Async stack trace
    main.(*Sim).ConfigGui.func2 at audonly.go:1813

Vulkan error: incompatible driver occurred when running the ra25 example

I installed leabra strictly according to the wiki. But when running the ra25 example. The below error occurred:

panic: vulkan error: vulkan error: incompatible driver (-9) on /Users/wjn/gopath/pkg/mod/github.com/goki/[email protected]/vgpu/errors.go:23 (0x1005b631e)
NewError: pc, _, _, ok := runtime.Caller(0)`

The compiling process went well. And the code could run without gui. Could you give me some instructions to resolve this problem?

Accounting for habituation and sensitization using Leabra

Hello,

I am not sure if I'm missing something, but is there any literature or models of habituation and sensitization using leabra? For instance, Gluck et al mention a model for habituation and sensitization in Sea Aplysia in their Learning and Memory (2008) book. Would that be doable with Leabra?

I had gone through the CoCoNeu book a couple months ago, and don't remember running into this at that time. At the current moment too, I couldn't find anything with a simple search for 'habituation' or 'sensitization'. I'm not sure if I just need to go through it again to be able to "see" how habituation and sensitization can be accounted for by Leabra; so would be glad to be pointed in the right direction!

Python install

intel mac os 12.3
Go installed and python 3.9

all requirements seem to be satisfied but make fails with:
...
--- Processing package: github.com/emer/etable/convolve ---

--- Processing package: github.com/emer/etable/efile ---
2022/05/08 19:18:00 internal error: package "fmt" without types was imported from "github.com/emer/etable/eplot"
make: *** [gen] Error 1

$

I can attach entire output if you'd like

Segfault when resizing the window during training

Can be replicated for multiple programs under emer/examples. Go version is 1.14.4; dependencies downloaded with go get -u ./... with GO111MODULE=off.
Error log (ra25):

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x5cf855]

goroutine 51 [running]:
image.(*RGBA).Bounds(0x0, 0xc0045357b0, 0x10, 0x10, 0x1469f20)
	/usr/local/go/src/image/image.go:72 +0x5
image/draw.clip(0x18ccd60, 0x0, 0xc00272f1d0, 0x18c8ea0, 0xc002f6a280, 0xc00272f200, 0x0, 0x0, 0xc00272f220)
	/usr/local/go/src/image/draw/draw.go:75 +0x54
image/draw.DrawMask(0x18ccd60, 0x0, 0x433, 0x57, 0x445, 0x69, 0x18c8ea0, 0xc002f6a280, 0x0, 0x0, ...)
	/usr/local/go/src/image/draw/draw.go:107 +0xab
image/draw.Draw(...)
	/usr/local/go/src/image/draw/draw.go:101
github.com/goki/gi/gi.(*Viewport2D).DrawIntoParent(0xc0026de000, 0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:362 +0x11a
github.com/goki/gi/gi.(*Viewport2D).RenderViewport2D(0xc0026de000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:542 +0x72
github.com/goki/gi/svg.(*Icon).Render2D(0xc0026de000)
	/home/theo/Projects/go/src/github.com/goki/gi/svg/icons.go:128 +0x11b
github.com/goki/gi/gi.(*Node2DBase).Render2DChildren(0xc004788000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:908 +0xa2
github.com/goki/gi/gi.(*Icon).Render2D(0xc004788000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/icon.go:153 +0x61
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0026d50f0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc0026d50f0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc0026d50f0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*PartsWidgetBase).Render2DParts(...)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/widget.go:853
github.com/goki/gi/gi.(*ButtonBase).Render2D(0xc0026d4c80)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/buttons.go:696 +0xd0
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc00263bdf0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc00263bdf0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc00263bdf0)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*PartsWidgetBase).Render2DParts(...)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/widget.go:853
github.com/goki/gi/gi.(*ButtonBase).Render2D(0xc00263b980)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/buttons.go:696 +0xd0
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000287180)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc000287180)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0008b2600)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*TabView).Render2D(0xc0008b2600)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/tabview.go:511 +0xb6
github.com/goki/gi/gi.(*SplitView).Render2D(0xc0005b6000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/splitview.go:418 +0x1c9
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000465180)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc000465180)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc000463b80)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:1447 +0xb9
github.com/goki/gi/gi.(*Layout).Render2D(0xc000463b80)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/layout.go:2107 +0xc3
github.com/goki/gi/gi.(*Node2DBase).Render2DChildren(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:908 +0xa2
github.com/goki/gi/gi.(*Viewport2D).Render2D(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:643 +0x62
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*Node2DBase).FullRender2DTree(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/node2d.go:728 +0x89
github.com/goki/gi/gi.(*Viewport2D).FullRender2DTree(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:563 +0x91
github.com/goki/gi/gi.(*Viewport2D).UpdateNodes(0xc000160000)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:837 +0x4d5
github.com/goki/gi/gi.(*Viewport2D).NodeUpdated(0xc000160000, 0x195df40, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:749 +0x166
github.com/goki/gi/gi.SignalViewport2D(0x1930040, 0xc000160000, 0x1932140, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
	/home/theo/Projects/go/src/github.com/goki/gi/gi/viewport.go:703 +0x1d2
github.com/goki/ki/ki.(*Signal).Emit(0xc0008d2058, 0x1932140, 0xc0008d2000, 0x1, 0x13a06a0, 0xc00312d1c8)
	/home/theo/Projects/go/src/github.com/goki/ki/ki/signal.go:173 +0x1a7
github.com/goki/ki/ki.(*Node).UpdateEnd(0xc0008d2000, 0xc0008d2001)
	/home/theo/Projects/go/src/github.com/goki/ki/ki/node.go:1935 +0x20a
github.com/emer/emergent/netview.(*NetView).GoUpdate(0xc00076f800)
	/home/theo/Projects/go/src/github.com/emer/emergent/netview/netview.go:126 +0xf6
main.(*Sim).UpdateView(0x2d754a0, 0x18e2001)
	/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:349 +0x92
main.(*Sim).AlphaCyc(0x2d754a0, 0x18dd101)
	/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:416 +0x37b
main.(*Sim).TrainTrial(0x2d754a0)
	/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:474 +0xa1
main.(*Sim).Train(0x2d754a0)
	/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:574 +0x32
created by main.(*Sim).ConfigGui.func4
	/home/theo/Projects/go/src/github.com/emer/leabra/examples/ra25/ra25.go:1263 +0x6f

WtFmDWt call timing issues

ss.Net.WtFmDWt() is called at start of AlphaCyc so the previous DWt call leaves the weight changes visible in the gui.

However, for simulations like the hippocampus (and also the weight priming model from ccn sims) where we test and score item-level performance after each epoch of training, the last item does not benefit from learning! This systematically slows the measured learning performance!

The specific sims can be fixed, but it would be good to have a more general fix for this issue.

Probably the best solution is just for the NetView to save all the synapse-level vars in a separate data structure at the point of the update call, without any history, and be done with it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.