Comments (6)
Since there is a definition of t in network/init, one possible way is to add t as an additional argument to step function. Inside the step function, introduce new variable to store spiking time (say t_spike). Everytime step function is called, check if t-t_spike is greater than refractory period and do operation accordingly.
from bindsnet.
Good point. How would you fix this? Feel free to open a PR.
from bindsnet.
Hm, that could be problematic when doing multiple simulations in sequence. For example:
network.run(inpts, time=100)
network.run(inpts, time=100) # Forgets refractory neurons from end of previous simulation!
Alternatively, one could just reverse the ordering, from:
# Decrement refractory counters.
self.refrac_count[self.refrac_count != 0] -= dt
# Integrate inputs.
self.v += (self.refrac_count == 0).float() * inpts
# Check for spiking neurons.
self.s = self.v >= self.thresh
# Refractoriness and voltage reset.
self.refrac_count.masked_fill_(self.s, self.refrac)
to
# Integrate inputs.
self.v += (self.refrac_count == 0).float() * inpts
# Decrement refractory counters.
self.refrac_count[self.refrac_count != 0] -= dt
# Check for spiking neurons.
self.s = self.v >= self.thresh
# Refractoriness and voltage reset.
self.refrac_count.masked_fill_(self.s, self.refrac)
Does this make sense? Does this appear to solve the problem?
from bindsnet.
Yes, that will be better than my solution.
from bindsnet.
You may need to be careful when changing order. There are models (like this) that do self.refrac_count == 0 more than once.
from bindsnet.
Solved by #136.
from bindsnet.
Related Issues (20)
- Low accuracy HOT 9
- SWAT: A Spiking Neural Network Training Algorithm for Classification Problems HOT 1
- A (serious) bug preventing RL algorithms to work HOT 4
- Has anyone manage to make one of the RL examples to work? HOT 2
- Saving, loading, and performing prediction from supervised examples HOT 1
- Is there any way to use BindsNet on RTX 3090? HOT 1
- 'bindsnet' is not recognized as an internal or external command, operable program or batch file. HOT 2
- How would I run this type of setup? HOT 2
- Reservoir issues!
- Network converted from ANN doesn't retain weights after training? HOT 3
- Question: Can it be used for speech emotion recognition task? HOT 1
- Does the `poisson` function under-produce spikes? HOT 13
- THE DEAD NEURON PROBLEM HOT 14
- ModuleNotFoundError: No module named 'torch._six' HOT 5
- Is SingleEncoder timing-based? HOT 7
- Are learning rules such as gradient descent available? HOT 1
- ModuleNotFoundError: No module named 'torch._six' HOT 4
- Columns and DataType Not Explicitly Set on line 18 of plot_benchmark.py
- How backpropagation work? HOT 6
- Using bindsnet for temperature prediction? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bindsnet.