Comments (3)
If I'm not mistaken (I didnt use this part of the code for a long time) the method bindsnet.conversion.ann_to_snn()
assume that the given ANN is already fully trained. The result of this method is an equivalent SNN that should perform similarly to the ANN.
The only training here should be performed on the ANN, not the SNN. Therefore, step three is not relevant.
About the PR, if the code work on the main BindsNET, I will be glad if you submit it to this repository, with only one request, you will help in the future to update the code if necessary to new upcoming changes in PyTorch/BindsNET.
from bindsnet.
Thank you for using BindsNET.
I'm a little confused, are you training the SNN twice?
The conversion process should be:
- Build an ANN using a regular PyTorch module and train it using your favorite gradient descent method.
- Building an SNN with the same topology as the ANN from the previous step.
- Converting the ANN weights to the equivalent range for SNN from the previous step.
- Testing SNN on the testing data.
Note
- when the training/conversion process finish, use
network. train(mode=False)
to freeze the weights. - ANN conversion to SNN should be used only once, running the code twice can lead to unexpected results. If the conversion wasn't successful the first time, some parameters need to be changed, and the process need to be started again.
ps. The script that you are using to convert the network is not updated and is not part of the supported code in BindsNET. The code you are using probably contain some code that needs to be update. With that said, I will be happy to help you use it, and hopefully, you can help by contributing your time to fix some of the small kinks that exist in the BindsNET code.
from bindsnet.
Thanks Hananel for the very quick reply!
We're not training the SNN twice. We're just using the ANN->SNN conversion as a way to build a deep SNN architecture. We couldn't find an example of a multilayer architecture in your example, so we've been using this method. Does this make sense?
So our process is:
- Build multilayer ANN in PyTorch.
- Convert to SNN using
bindsnet.conversion.ann_to_snn()
- Train SNN as in your examples (
eth_mnist.py
)
So basically this should work right? The problem is that after step 3, the SNN doesn't seem to retain the weights.
Re: unsupported code, yes I'm aware of that and even opened a pull request to update the external script.
However, the conversion
module is part of the BindsNET package, so should be supported, right?
Any help would be much appreciated.
Thanks again!
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!
- 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.