Conversation
- fixed type for possible integer underflow in SP - default seed is "random" (0). Also in Python. - use directly fixed seed where needed in tests for deterministic results. (for this added c++ helper methods `setSeed(UInt)` ) - fix docs - update tests To be used by NAB detector.
breznak
left a comment
There was a problem hiding this comment.
@dkeeney could you have a look with me please?
Most changes ironed out, but there's something stinky in the SP's seed, serialization. I recall a user reporting a bug here with different results with a SP loaded from serialized state.
|
|
||
| //uses fixed seed for deterministic output checks: | ||
| Random rnd(42); | ||
| spGlobal.setSeed(1); |
There was a problem hiding this comment.
a strange thing is happening here, I set the rng_ to fixed seed (1 used to be used before) ...but determ. output is still changing!
|
|
||
|
|
||
| Argument seed Seed for our random number generator. If seed is < 0 | ||
| Argument seed Seed for our random number generator. If seed is 0 |
There was a problem hiding this comment.
corrected the doc strings
| , py::arg("dutyCyclePeriod") = 1000 | ||
| , py::arg("boostStrength") = 0.0 | ||
| , py::arg("seed") = 1 | ||
| , py::arg("seed") = 0 |
There was a problem hiding this comment.
changed the defaults to "random" (0) in cpp, py, NetworkAPI
| testTimer.stop(); | ||
|
|
||
| EXPECT_EQ(outputBaseline, outputC); | ||
| EXPECT_EQ(outputBaseline, outputC); //FIXME this test randomly fails. (De/serialization of rng_ is correct?) |
There was a problem hiding this comment.
this is another test that is inconsistent! Sometimes it passes, sometimes crashes on different outputs. I can't see why would that be, the test is relatively simple and seems correct.
I'm suspecting something with serizalization of Random?
Even more confusing is why HellpSPTP fails undeterministically now?
dkeeney
left a comment
There was a problem hiding this comment.
I took a quick look at the Random code and it looks ok. Nothing obvious that might cause it to fail.
random seed was not properly applied.
replaced by Cereal
replaced by Cereal
I need more precise detail if/why two SPs differ.
these are helper data classes that hold "heavy" info on connections: SegmentData, SynapseData
to be more descriptive when difference is found. Useful for debugging.
apparently improper combination of cereal::make_nvp() and CEERAL_NVP(). Only the latter should be used. Finished simplified Conn serialization, only data-members are directly serialized. No need to call initialize() and other functions manually.
|
Waiting for bigger changes in #601 , after that I should debug this. |
now passes after merging the last PR
results. (for this added c++ helper methods
setSeed(UInt))To be used by NAB detector.
For use in #792 ,