hudon / spike

Brain Simulator Parallelization
http://nengo.ca/
1 stars 1 forks source link

Small difference in test_direct.py test. #43

Closed RobertElder closed 10 years ago

RobertElder commented 11 years ago

Since we support a lot more stuff now, I added the test_direct.py test to our unit tests, and everything looks identical, except the output seems to be time shifted a few values. Possibly this is due to an off by one error caused by the complexities of time step delays?

This can be viewed on the branch moaar-tests

run make test

Computing output from command '/usr/bin/python2 /home/robert/spike/test/nengo_tests/test_direct.py /home/robert/spike/test/../src'...Took 4 seconds. Computing output from command '/usr/bin/python2 /home/robert/spike/test/nengo_tests/test_direct.py /home/robert/spike/test/../examples/new-theano'...Took 4 seconds. ERROR: Diff was: 4052,4061d4051 < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] < [ 0. 0.] 4961a4952,4961

[ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] [ 0.00141621 0.00141621] ERROR: Output from '/usr/bin/python2 /home/robert/spike/test/nengo_tests/test_direct.py /home/robert/spike/test/../src' and '/usr/bin/python2 /home/robert/spike/test/nengo_tests/test_direct.py /home/robert/spike/test/../examples/new-theano' does not match. make: *\ [test] Error 1

gretac commented 10 years ago

This error is due to the fact that when a direct ensemble is given a function for the origin, the origin's outputs are not generated with a 1-time-tick delay. I can easily fix this by making the direct ensembles with such origins skip the initial enforced tick that we do, but I wanted first to ask Terry if this is the intended behaviour in the first place.