miladmozafari / SpykeTorch

High-speed simulator of convolutional spiking neural networks with at most one spike per neuron.
GNU General Public License v3.0
381 stars 100 forks source link

Accuracy problem #7

Closed meltingCat closed 3 years ago

meltingCat commented 4 years ago

Hi, I ran MozafariDeep.py and got the result below. The accuracy is not as good as paper 97.2%.

Current Train: [0.98281667 0.01718333 0.        ]
   Best Train: [9.83033333e-01 1.69666667e-02 0.00000000e+00 6.68000000e+02]
 Current Test: [0.9637 0.0363 0.    ]
    Best Test: [9.649e-01 3.510e-02 0.000e+00 6.770e+02]
time elapsed: 95007.85 seconds
miladmozafari commented 4 years ago

Hi, SpykeTorch's implementation of the paper is slightly different than the original C++/CUDA implementation. We also acknowledged this performance drop in SpykeTorch's paper (https://www.frontiersin.org/articles/10.3389/fnins.2019.00625/full). I guess with a little bit of parameters tuning in SpykeTorch's implementation, one can achieve better performance.

wusaifei commented 4 years ago

@meltingCat You can try to increase timesteps a little, for example, timesteps = 30 can achieve an accuracy of 97.2%.

meltingCat commented 4 years ago

@wusaifei Thanks, I will try.

meltingCat commented 4 years ago

@wusaifei Increasing timesteps to 30 wasn't work.

Current Train: [0.9836 0.0164 0.    ]
   Best Train: [9.8415e-01 1.5850e-02 0.0000e+00 6.4500e+02]
 Current Test: [0.9635 0.0365 0.    ]
    Best Test: [9.662e-01 3.380e-02 0.000e+00 5.200e+02]
time elapsed: 99914.84 seconds
time elapsed: 99914.83597874641 seconds