sebastianmonten / building-a-spiking-neural-network-from-scratch

0 stars 0 forks source link

Rewrite the project and make it more concise and time efficient #14

Open sebastianmonten opened 1 month ago

sebastianmonten commented 1 month ago

description:

Currently a run with the network [1024, 256, 32, 2] apperantly takes 22 s on the H743ZI2 nucleo board and 4.2 s on my laptop. This does not seam right.

sebastianmonten commented 3 weeks ago

Profiling program on nucleo board in STM32CubeIDE

1024 inputs

UPDATE_LAYER_TOTAL_TIME: 814 ms

UPDATE_MEMBRANE_POTENTIAL_TOTAL_TIME: 78 ms

SET_INPUT_BUFFER_TOTAL_TIME: 21 ms

UPDATE_INPUTS_1_TOTAL_TIME: 6969 ms

################################################
################################################

Total time: 7804.000000 ms

Network shape: [1024 256 32 2 ]

Number of iterations: 35

Number of computations: 10089

Done with snn()!

512 inputs

UPDATE_LAYER_TOTAL_TIME: 788 ms

UPDATE_MEMBRANE_POTENTIAL_TOTAL_TIME: 72 ms

SET_INPUT_BUFFER_TOTAL_TIME: 12 ms

UPDATE_INPUTS_1_TOTAL_TIME: 3520 ms

################################################
################################################

Total time: 4321.000000 ms

Network shape: [512 256 32 2 ]

Number of iterations: 35

Number of computations: 10085

Done with snn()!

256 inputs

UPDATE_LAYER_TOTAL_TIME: 738 ms

UPDATE_MEMBRANE_POTENTIAL_TOTAL_TIME: 84 ms

SET_INPUT_BUFFER_TOTAL_TIME: 6 ms

UPDATE_INPUTS_1_TOTAL_TIME: 1796 ms

################################################
################################################

Total time: 2541.000000 ms

Network shape: [256 256 32 2 ]

Number of iterations: 35

Number of computations: 10042

Done with snn()!