Giter Club home page Giter Club logo

Comments (10)

rcoreilly avatar rcoreilly commented on May 27, 2024

I suspect the crash is due to the TstTrlLog logic:

in ConfigTstTrlLog there is this line:

	dt.SetFromSchema(sch, nt)

where the nt is the number of patterns in the TestEnv.Table

Then in the LogTstTrl it has row := trl and writes directly to that row

Thus if ConfigTstTrlLog is not called after changing the TestEnv.Table, then you'll get the behavior you describe.

Two solutions: 1. call Config.. or 2. change the Log behavior to include:

	dt.SetNumRows(row + 1)

so it always ensures that there is just the right number of rows. I didn't do this originally so it would show the whole set of test items consistently and just update them with testing, but it is more robust to include that call..

from emergent.

rcoreilly avatar rcoreilly commented on May 27, 2024

assuming this one is fixed now? reopen if not.

from emergent.

xiaonanl avatar xiaonanl commented on May 27, 2024

No, this is not fixed in the hip model. I haven't tried with the hip example though but it should be the case because I didn't modify basic train and test loop and env config in my model. One can get around this issue by calling ss.ConfigEnv() at the beginning of train/test run but i'm not sure whether this will create new problem in multiple run training.

from emergent.

xiaonanl avatar xiaonanl commented on May 27, 2024

The error was panic: runtime error: index out of range [12] with length 12. That's training a 12 trial pattern in a 24 trial env

from emergent.

xiaonanl avatar xiaonanl commented on May 27, 2024

I'm posting the new error here. Since it's an easy fix, I'm not opening a new issue but let me know if you want me to open a new one.

panic: runtime error: index out of range [12] with length 12

goroutine 45 [running]:
github.com/emer/etable/etensor.(*String).StringVal1D(0xc01a15c600, 0xc, 0x19eee3e, 0x4)
C:/Users/xlliu/go/src/github.com/emer/etable/etensor/string.go:150 +0x4b
github.com/emer/emergent/env.(*FixedTable).SetTrialName(0x2954cb8)
C:/Users/xlliu/go/src/github.com/emer/emergent/env/fixed.go:90 +0xde
github.com/emer/emergent/env.(*FixedTable).Step(0x2954cb8, 0xc0004ca410)
C:/Users/xlliu/go/src/github.com/emer/emergent/env/fixed.go:102 +0xb5
main.(*Sim).TrainTrialHip(0x2954c00)
C:/Users/xlliu/go/src/leabra/sleep_hip/presleep_hip_2TC.go:1125 +0x4f
main.(*Sim).TrainHip(0x2954c00)
C:/Users/xlliu/go/src/leabra/sleep_hip/presleep_hip_2TC.go:1521 +0x44
created by main.(*Sim).ConfigGui.func4
C:/Users/xlliu/go/src/leabra/sleep_hip/presleep_hip_2TC.go:2500 +0x76

from emergent.

rcoreilly avatar rcoreilly commented on May 27, 2024

ok that specific case now fixed.. post any others you might find..

from emergent.

xiaonanl avatar xiaonanl commented on May 27, 2024

it no longer crashes but instead running "blank trials" after running all the patterns until the original number. But it seems harmless.

calling init will fix the problem from the getgo though but if changing training pattern after training something, init will init weights as well. calling ConfigEnv at the beginning of the large train/test loop will still fix the problem, assuming this won't init the weights.

This is the error for one random line. It shows this info for every blank lines. 2019/10/03 10:32:24 etable.Table Row: 23 is not valid for table with Rows: 12

from emergent.

rcoreilly avatar rcoreilly commented on May 27, 2024

Yeah if you change the input table then you definitely need to call Init on the Env object, e.g., ConfigEnv, which won't change the weights or anything.

from emergent.

xiaonanl avatar xiaonanl commented on May 27, 2024

this will disable the ability to pickup what's left from step training and always start from the beginning. but this is not a big issue - one could create a init env button or load the short form as a diffident env at the beginning.

from emergent.

rcoreilly avatar rcoreilly commented on May 27, 2024

well if you're changing the input table, then something needs to happen -- if this is an actual use-case the best thing is to make a new version of the env.Env interface that handles the changes directly. The current env.FixedTable is for a "fixed" table of patterns so it isn't designed for dynamic changes to the inputs.

from emergent.

Related Issues (20)

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.