brian-team / brian2cuda

A brian2 extension to simulate spiking neural networks on GPUs
https://brian2cuda.readthedocs.io/
GNU General Public License v3.0
61 stars 12 forks source link

Nicer example plots #277

Closed mstimberg closed 2 years ago

mstimberg commented 2 years ago

This "beautifies" the example plots. I did not modify the Brunel/Hakim example, but I guess we have plotting code for it somewhere?

Here are the plots as a result of running:

$ python cobahh.py --devicename cpp_standalone --scenario uncoupled --N 5000 --monitors --no-profiling
$ python stdp.py --devicename cpp_standalone --delays none --no-profiling --monitors
$ python mushroombody.py --devicename cpp_standalone --N 10000 --no-profiling --monitors

Note that I also fixed the difference in scaling of the STDP example with respect to brian2cuda/tests/features/speed.py (@denisalevi maybe have a look that I did this correctly).

cobahh_cpp_scenario-uncoupled_N-5000_no-profiling_monitors_no-single-precision_atomics_bundle-mode_vuvuzela

stdp_cpp_delays-none_post-effects_N-10000_no-profiling_monitors_single-precision_atomics_bundle-mode_vuvuzela

mushroombody_cpp_N-10000_no-profiling_monitors_no-single-precision_atomics_bundle-mode_vuvuzela

denisalevi commented 2 years ago

Thanks @mstimberg, looks great!

  1. Could you base any changes on the paper2022-revision branch? Because master already moved forward with changes that should not belong into the paper code (e.g. changing the code slots, which currently would break the benchmarks). Could you reapply your commits on paper2022-revision instead?
  2. I will check the STDP example again. But why is it running for 20s? Shouldn't we just run it for 10s and mention that the weight distribution is bimodal after ~100s?
  3. The plotting code for the Brunel/Hakim example that I used for figure 1 is here. But I guess we don't need it in the supps since its already in figure 1, right?
mstimberg commented 2 years ago
  1. Could you base any changes on the paper2022-revision branch? Because master already moved forward with changes that should not belong into the paper code (e.g. changing the code slots, which currently would break the benchmarks). Could you reapply your commits on paper2022-revision instead?

Sure, will do.

2. I will check the STDP example again. But why is it running for 20s? Shouldn't we just run it for 10s and mention that the weight distribution is bimodal after ~100s?

It was a bit of a compromise to see the weight distribution changing in the last plot, but happy to run it for 10s (maybe making the runtime a command line argument?)

3. The plotting code for the Brunel/Hakim example that I used for figure 1 is here. But I guess we don't need it in the supps since its already in figure 1, right?

I agree, but for consistency it would be nice if the same (or at least a similar) plot gets generated when you run brunelhakim.py in the examples.

mstimberg commented 2 years ago

All of the points :point_up: should now be fixed.

denisalevi commented 2 years ago

I made a few more changes @mstimberg , cleaning up the example scripts.

Relevant for us:

denisalevi commented 2 years ago

You are done here @mstimberg, right? I'll merge this.

mstimberg commented 2 years ago

You are done here @mstimberg, right? I'll merge this.

Yep.