neurali:nemo_appunti_c
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
neurali:nemo_appunti_c [2015/07/21 19:40] – profpro | neurali:nemo_appunti_c [2020/06/08 22:20] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====Appunti su Nemo====== | ||
+ | [[neurali: | ||
+ | |||
+ | Esempio da capire e commentare (tratto dai sorgenti di NeMo) | ||
+ | |||
+ | <code c++> | ||
+ | /* Simple network with 1000 neurons with all-to-all connections with random | ||
+ | * weights. | ||
+ | |||
+ | * Author: Andreas K. Fidjeland < | ||
+ | * Date: April 2010 | ||
+ | */ | ||
+ | |||
+ | #include < | ||
+ | |||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | typedef boost:: | ||
+ | typedef boost:: | ||
+ | typedef boost:: | ||
+ | |||
+ | / | ||
+ | nemo:: | ||
+ | construct(unsigned ncount, unsigned scount, unsigned dmax, bool stdp) | ||
+ | { | ||
+ | rng_t rng; | ||
+ | /* Neuron parameters and weights are partially randomised */ | ||
+ | urng_t randomParameter(rng, | ||
+ | uirng_t randomTarget(rng, | ||
+ | uirng_t randomDelay(rng, | ||
+ | |||
+ | nemo:: | ||
+ | |||
+ | for(unsigned nidx=0; nidx < ncount; ++nidx) { | ||
+ | if(nidx < (ncount * 4) / 5) { // excitatory | ||
+ | addExcitatoryNeuron(net, | ||
+ | for(unsigned s = 0; s < scount; ++s) { | ||
+ | net-> | ||
+ | } | ||
+ | } else { // inhibitory | ||
+ | addInhibitoryNeuron(net, | ||
+ | for(unsigned s = 0; s < scount; ++s) { | ||
+ | net-> | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | return net; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
+ | quali include ? | ||
+ | |||
+ | nemo/util.h | ||
+ | nemo/ | ||
+ | nemo.hpp | ||
+ | boost/ | ||
+ | boost/ | ||
+ | boost/ | ||
+ | | ||
+ | |||
+ | classi (in minuscolo!) boost da studiare | ||
+ | |||
+ | boost: | ||
+ | boost: | ||
+ | boost: | ||
+ | boost: | ||
+ | boost: | ||
+ | |||
+ | funzioni boost da studiare | ||
+ | |||
+ | boost:: | ||
+ | boost:: | ||
+ | boost:: | ||
+ | | ||
+ | Funzioni di esempio (utilizzabili? | ||
+ | |||
+ | addExcitatoryNeuron | ||
+ | addInhibitoryNeuron | ||
+ | simulate | ||
+ | vmap | ||
+ | processOptions | ||
+ | random:: | ||
+ | | ||
+ | NOTA: I tempi **Delay** di una sinapsi potrebbero essere un altro modo per tenere conto delle **distanze** fisiche tra neuroni. | ||
+ | |||
+ | Funzioni da approfondire | ||
+ | |||
+ | simulazione.resetTimer() | ||
+ | simulazione.step() che restituisce un vector contenente i neuroni che si sono attivati | ||
+ | simulazione.applyStdp() | ||
+ | simulazione.elapsedWallclock() | ||
+ | simulazione.getMembranePotential() | ||
+ | | ||
+ | configurazione.setStdpFunction() | ||
+ | configurazione.setWriteOnlySynapses() | ||
+ | configurazione.enableLogging() | ||
+ | configurazione.setSpuBackend() | ||
+ | | ||
neurali/nemo_appunti_c.txt · Last modified: 2020/06/08 22:20 by 127.0.0.1