21 #ifndef SNABSUITE_SNABS_WTA_HPP 22 #define SNABSUITE_SNABS_WTA_HPP 24 #include <cypress/cypress.hpp> 39 std::vector<cypress::PopulationBase> m_pop;
40 std::vector<cypress::Population<cypress::SpikeSourcePoisson>> m_pop_source;
41 size_t m_num_neurons_pop = 0, m_num_source_neurons = 0;
42 cypress::Real m_firing_rate;
43 NeuronParameter m_neuro_params;
44 cypress::Real m_simulation_length = 10000;
45 cypress::Real m_bin_size = 15.0;
48 cypress::Real m_weight_inp = 0, m_delay = 1.0, m_weight_self = 0.0,
50 cypress::Real m_prob_inp = 0, m_prob_self = 0.0, m_prob_inh = 0.0;
54 cypress::Network &build_netw(cypress::Network &
netw)
override;
55 void run_netw(cypress::Network &netw)
override;
56 std::vector<std::array<cypress::Real, 4>> evaluate()
override;
58 std::shared_ptr<SNABBase>
clone()
override 60 return std::make_shared<SimpleWTA>(m_backend, m_bench_index);
71 static std::vector<Real> calculate_WTA_metrics(
72 const std::vector<size_t> &bins,
const std::vector<size_t> &bins2,
82 std::vector<cypress::PopulationBase> m_pop;
83 std::vector<cypress::Population<cypress::SpikeSourcePoisson>> m_pop_source;
84 cypress::PopulationBase m_inhibit_pop;
85 size_t m_num_neurons_pop = 0, m_num_source_neurons = 0,
86 m_num_inhibitory_neurons = 0;
87 cypress::Real m_firing_rate;
88 NeuronParameter m_neuro_params;
89 cypress::Real m_simulation_length = 10000;
90 cypress::Real m_bin_size = 15.0;
93 cypress::Real m_weight_inp = 0, m_delay = 1.0, m_weight_self = 0.0,
94 m_weight_lat_inh = 0.0, m_weight_lat_exc = 0.0;
95 cypress::Real m_prob_inp = 0, m_prob_self = 0.0, m_prob_lat_exc = 0.0;
99 cypress::Network &build_netw(cypress::Network &network)
override;
100 void run_netw(cypress::Network &network)
override;
101 std::vector<std::array<cypress::Real, 4>> evaluate()
override;
103 std::shared_ptr<SNABBase>
clone()
override 105 return std::make_shared<LateralInhibWTA>(m_backend, m_bench_index);
115 std::vector<cypress::PopulationBase> m_pop;
116 std::vector<cypress::Population<cypress::SpikeSourcePoisson>> m_pop_source;
117 std::vector<cypress::PopulationBase> m_inhibit_pop;
118 size_t m_num_neurons_pop = 0, m_num_source_neurons = 0,
119 m_num_inhibitory_neurons = 0;
120 cypress::Real m_firing_rate;
121 NeuronParameter m_neuro_params;
122 cypress::Real m_simulation_length = 10000;
123 cypress::Real m_bin_size = 15.0;
126 cypress::Real m_weight_inp = 0, m_delay = 1.0, m_weight_self = 0.0,
127 m_weight_to_inh = 0.0, m_weight_from_inh = 0.0;
128 cypress::Real m_prob_inp = 0, m_prob_self = 0.0, m_prob_to_inh = 0.0;
132 cypress::Network &build_netw(cypress::Network &network)
override;
133 void run_netw(cypress::Network &network)
override;
134 std::vector<std::array<cypress::Real, 4>> evaluate()
override;
135 std::shared_ptr<SNABBase>
clone()
override 137 return std::make_shared<MirrorInhibWTA>(m_backend, m_bench_index);
std::shared_ptr< SNABBase > clone() override
Virtual method cloning the SNAB without knowing which SNAB it is.
std::shared_ptr< SNABBase > clone() override
Virtual method cloning the SNAB without knowing which SNAB it is.
Virtual Base class for SNABs(Benchmarks). All SNABs should have seperate building of networks...
std::shared_ptr< SNABBase > clone() override
Virtual method cloning the SNAB without knowing which SNAB it is.