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}
Tensor.repeat(n)
method to repeat a tensor n times.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.Copyright © Eclipse Foundation, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Copyright Agent