Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancing reporting of application and machine graphs #291

Open
pabogdan opened this issue Mar 4, 2020 · 2 comments
Open

Enhancing reporting of application and machine graphs #291

pabogdan opened this issue Mar 4, 2020 · 2 comments
Assignees
Milestone

Comments

@pabogdan
Copy link
Member

pabogdan commented Mar 4, 2020

It would be awesome if we could generate textual reports as the simulation is being run to clarify exactly what is being run.
An example taken from what Keras does:

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
dense_1 (Dense)              (10, 1, 300)              235500    
_________________________________________________________________
dense_2 (Dense)              (10, 1, 100)              30100     
_________________________________________________________________
flatten_1 (Flatten)          (10, 100)                 0         
_________________________________________________________________
dense_3 (Dense)              (10, 10)                  1010      
=================================================================
Total params: 266,610
Trainable params: 266,610
Non-trainable params: 0
_________________________________________________________________

This is done by calling a method such as model.summary(). It shows each layer (population) in the network, with number of parameters (synapses) and output shape (which contains information about number of neurons as well).

I'm requesting something like this for SpiNNaker because otherwise I write my own for every single project. For example:

================================================================================
Creating projection aa_goc                    from granule    to golgi      with a weight of  0.020000 uS and a delay of 2.0 ms
Creating projection aa_pc                     from granule    to purkinje   with a weight of  0.075000 uS and a delay of 2.0 ms
Creating projection bc_pc                     from basket     to purkinje   with a weight of -0.009000 uS and a delay of 4.0 ms
Creating projection gj_bc                     from basket     to basket     with a weight of -0.002500 uS and a delay of 4.0 ms
Creating projection gj_goc                    from golgi      to golgi      with a weight of -0.008000 uS and a delay of 1.0 ms
Creating projection gj_sc                     from stellate   to stellate   with a weight of -0.002000 uS and a delay of 1.0 ms
Creating projection glom_dcn                  from glomerulus to dcn        with a weight of  0.000006 uS and a delay of 4.0 ms
Creating projection glom_goc                  from glomerulus to golgi      with a weight of  0.002000 uS and a delay of 4.0 ms
Creating projection glom_grc                  from glomerulus to granule    with a weight of  0.009000 uS and a delay of 4.0 ms
================================================================================
Number of neurons in each population
--------------------------------------------------------------------------------
	golgi           ->        219 neurons
	glomerulus      ->       7073 neurons
	granule         ->      88158 neurons
	purkinje        ->         69 neurons
	basket          ->        603 neurons
	stellate        ->        603 neurons
	dcn             ->         12 neurons
TOTAL      ->      96737 neurons
================================================================================
================================================================================
Number of synapses per projection:
--------------------------------------------------------------------------------
	goc_grc                     ->     206092 synapses [inh]
	pc_dcn                      ->        314 synapses [inh]
	aa_pc                       ->      17256 synapses [exc]
	pf_goc                      ->     350399 synapses [exc]
	glom_dcn                    ->       1763 synapses [exc]
	gj_sc                       ->       2411 synapses [inh]
	glom_grc                    ->     352474 synapses [exc]
	bc_pc                       ->       1379 synapses [inh]
TOTAL      ->    xxxx  synapses
================================================================================
Number of incoming connections per population:
--------------------------------------------------------------------------------
	golgi           ->     451168 incoming synapses
	glomerulus      ->          0 incoming synapses
	granule         ->     558566 incoming synapses
	basket          ->     606900 incoming synapses
	purkinje        ->    1977916 incoming synapses
	dcn             ->       2077 incoming synapses
	stellate        ->     617588 incoming synapses
================================================================================
Normalised number of incoming connections per population:
--------------------------------------------------------------------------------
	golgi           ->  2060.13 incoming synapses
	glomerulus      ->     0.00 incoming synapses
	granule         ->     6.34 incoming synapses
	basket          ->  1006.47 incoming synapses
	purkinje        -> 28665.45 incoming synapses
	dcn             ->   173.08 incoming synapses
	stellate        ->  1024.19 incoming synapses
================================================================================

Generally, important statistics are: number of neurons, number of realised synapses (sPyNNaker will happily accept synpase source/target ids that are larger than the number of neurons), fan-in per population, maximum fan-in per neuron.

Important, but generally overlooked: there's a mismatch between e.g. weight values defined on the host and what they become on SpiNNaker (16 bit precision, weight scaling etc). I find it enormously useful to compare the values I think I put in and what it actually is on chip.

================================================================================
Average weight per projection
--------------------------------------------------------------------------------
goc_grc                     -> 0.00500011 uS c.f. -0.00500000 uS (100.00%)
bc_pc                       -> 0.00900269 uS c.f. -0.00900000 uS ( 99.97%)
aa_pc                       -> 0.07499695 uS c.f.  0.07500000 uS (100.00%)
pf_goc                      -> 0.00048828 uS c.f.  0.00040000 uS ( 81.92%)
pf_pc                       -> 0.00001526 uS c.f.  0.00002000 uS ( 76.29%)
================================================================================
@rowleya
Copy link
Member

rowleya commented Mar 4, 2020

Sounds useful. Given that you write this for every project, do you have some code you could share?

@rowleya
Copy link
Member

rowleya commented Mar 4, 2020

This also sounds related to SpiNNakerManchester/sPyNNaker#704

@Christian-B Christian-B added this to the 6.0.0 milestone Jul 8, 2020
@dkfellows dkfellows modified the milestones: 6.0.0, 7.0.0 Apr 12, 2021
@Christian-B Christian-B modified the milestones: 7.0.0, Bluesky Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants