feat: add rate spikegen for snns
Context
There are different methods to convert an input image to a spike train of sequence length num_steps
for SNNs.
This MR aims to implement a basic version of rate coding : each input value is used as a probability of spiking.
For instance :
auto spikes = spikegenRate({0,0,0}, 3);
// spikes = {{0,0,0}, {0,0,0}, {0,0,0}}
auto spikes = spikegenRate({1,1,1, 1}, 1);
// spikes = {1,1,1,1}
Modifications
- Added a helper
Tensor.repeat(n)
method to repeat a tensor n times. - Added a
spikegenRate(std::shared_ptr<Tensor> tensor, std::uint32_t numSteps) -> Tensor
method.spikegenRate
replicates the input tensor for a specified number of steps and then converts its values into binary spikes using a rate-based (probabilistic) approach.
Edited by Jerome Hue
Merge request reports
Activity
Filter activity
added 1 commit
- dd353248 - Add python binding for spikegen rate function
requested review from @olivierbichler
assigned to @jeromeh
added 8 commits
-
dd353248...a7ec11eb - 2 commits from branch
eclipse/aidge:dev
- 35a73120 - Add a Tensor.repeat() method
- cb327fea - Add unit test for Tensor.repeat()
- 17826146 - First draft of spikegen rate convert function
- bb4d9a3a - Minor changes (doc, functions signatures)
- 6bf56a29 - Add basic test for Spikegen functions
- 3fcfacf8 - Add python binding for spikegen rate function
Toggle commit list-
dd353248...a7ec11eb - 2 commits from branch
added Feature 🚀 StatusReview Ready TopicTensor labels
added 24 commits
-
5afad3e3...f0e41abc - 18 commits from branch
eclipse/aidge:dev
- 7601c33d - Add a Tensor.repeat() method
- b08b2ba5 - Add unit test for Tensor.repeat()
- 19e30749 - First draft of spikegen rate convert function
- 6db290e8 - Minor changes (doc, functions signatures)
- 02061735 - Add basic test for Spikegen functions
- 985fb609 - Add python binding for spikegen rate function
Toggle commit list-
5afad3e3...f0e41abc - 18 commits from branch
- Resolved by Maxence Naud
- Resolved by Maxence Naud
- Resolved by Jerome Hue
mentioned in issue #245
added 9 commits
-
b775a82c...76ccc349 - 2 commits from branch
eclipse/aidge:dev
- 764504df - Add a Tensor.repeat() method
- 70a0be1f - Add unit test for Tensor.repeat()
- cada2936 - First draft of spikegen rate convert function
- d12e93cd - Minor changes (doc, functions signatures)
- b76754c4 - Add basic test for Spikegen functions
- 7bb39405 - Add python binding for spikegen rate function
- fd3f8a3b - Make a local function static
Toggle commit list-
b775a82c...76ccc349 - 2 commits from branch
enabled an automatic merge when all merge checks for fd3f8a3b pass
Please register or sign in to reply