Comments (6)
@jackyfaster Sorry for the delay, I'm travelling at the moment, will get the chance to take a look some time next week.
from snn_toolbox.
@rbodo Nice, I'm waiting for your message.
from snn_toolbox.
When you say "BinaryNet", are you referring to binarizing both weights and activations, using the framework of Mathieu Courbariaux? If so, #33 might be related.
But I see you are using keras and tensorflow in your config file, so it seems you binarized the network yourself? What kind of binarization function are you using for the activations? binary_tanh for [-1, 1], or binary_sigmoid for [0, 1], or something else?
Some things to check / try:
- Inspect the
_INI.h5
file which the toolbox saves and make sure the weights are indeed binarized as desired. - Increase the simulation duration
- Use "Reset by subtraction" instead of "Reset to zero"
- Enable output plots by setting plot_vars = {'all'} in section [output] of your config file. Then compare the ANN activations and the SNN spikerates. This should give you an idea where the SNN diverges from the ANN.
- Does your model use a MaxPooling layer? They might cause some drop in accuracy when converted to spiking, but not that much.
- You are probably using softmax as output activation function. Try setting softmax_to_relu = True in the [conversion] section.
from snn_toolbox.
@rbodo Hi,
I binarized both weights and activations myself, and i used binary_tanh[-1, 1] binarization function.
thanks for your suggestions much, i will try.
from snn_toolbox.
@rbodo hi,
i am sorry to bother you again,
i changed the binarization function from binary_tanh to binary_sigmoid, the box works well. thanks for your suggestions again!
and i want to ask a question more, i run a same ANN model in the box, not only one time, i got the different results as the following:
one result
Batch 2 of 2 completed (100.0%)
Moving accuracy of SNN (top-1, top-5): 93.00%, 100.00%.
Moving accuracy of ANN (top-1, top-5): 91.00%, 100.00%.
Simulation finished.
another result
Batch 2 of 2 completed (100.0%)
Moving accuracy of SNN (top-1, top-5): 91.00%, 100.00%.
Moving accuracy of ANN (top-1, top-5): 91.00%, 100.00%.
Simulation finished.
I would be grateful if you could give me some advice.
from snn_toolbox.
Just to clarify: The network in both cases is the same?
Also, I assume you made sure that the samples in the 2 batches are the same in both cases.
Then you need to make sure that the binarization functions you use are deterministic. Go to the script snntoolbox/utils/utils.py and have a look at the various binarization functions. They expose the argument deterministic
, which is True
by default. If you use any of them, check that this parameter is not maybe set to False
.
Finally, you could find out which two samples were misclassified in the second case. Then plot the spikerates, correlations etc for these two samples, and see whether / how they change when you run it again.
from snn_toolbox.
Related Issues (20)
- TypeError: can't multiply sequence by non-int of type 'float' HOT 4
- IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
- SpinnmanIOException: IO Error: Failed to communicate with the machine HOT 7
- Query regarding INI simulator HOT 6
- Conv1D Conversion Normalization Issue HOT 2
- ONNX model could not be ported to Keras.Mismatched elements 100% HOT 1
- Code required for a research paper HOT 2
- ModuleNotFoundError: No module named 'keras_rewiring' HOT 2
- Which neuromorphic hardware does SNNtoolbox simulate ? HOT 3
- Error happened while building parsed model HOT 2
- Key Error HOT 1
- index -1 is out of bounds for axis 1 with size 0 HOT 2
- Membrane Potential Values after spike conv layer. HOT 1
- Loading a a converted SNN .h5 model using 'load_model' HOT 1
- Energy and runtime estimation for running the SNN on neuromorphic simulator HOT 3
- TTTFS dyn thresh and TTFS corrective not working HOT 2
- Poisson Rate Encoding HOT 4
- Quantization HOT 6
- TTFS HOT 1
- Cannot import name 'literal' from typing. 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 snn_toolbox.