I tried using Brian2 in the previous article, but this time I will use BindsNET, which is software that can implement SNN.
SNN (Spiking Neural Network) is closer to neurophysiology than the current Deep Learning, and learning is performed using simulation of neural activity. SNN and BindsNET are also introduced in this article.
GitHub:https://github.com/BindsNET/bindsnet Paper: https://www.frontiersin.org/articles/10.3389/fninf.2018.00089/full Documentation: https://bindsnet-docs.readthedocs.io/
While NEURON and Brian2 are mainly used for simulators, BindsNET will be mainly used as machine learning software. BindsNET is based on PyTorch and can also use GPU. It seems that BindsNET can implement reinforcement learning as well as supervised and unsupervised learning.
The environment is Ubuntu 16.04 CUDA 10 Anaconda Python 3.6 is.
pip install bindsnet
You have now installed. The version was 0.2.7.
However, if this is left as it is, an error will occur when running the demo. The workaround was to change the version of Pytorch and reinstall it with pytorch == 1.2.0.
First, download it with git clone.
git clone https://github.com/BindsNET/bindsnet.git
There are various demos in bindsnet / examples /. For the time being, I will run a demo of supervised learning.
cd examples/mnist/
python supervised_mnist.py
It took about 20 minutes to complete, but it worked. I was able to use the GPU with the --gpu option, but it didn't get faster. (Rather a little slower.) I was also worried that the test score was not very good.
I'll also run a demo of unsupervised learning (Diehl & Cook).
python eth_mnist.py
This seems to take several hours to complete.
Other demonstrations included self-organizing maps (SOMs), reservoir computing, and reinforcement learning.
According to Documentation, the implementation method is (1) Creation of network and (2) Definition of learning rules It seems to do two things. When creating a network, LIF neurons etc. are defined as layers and connected. In the definition of learning rules, we set learning rules such as Hebb law and STDP law for coupling.
BindsNET cannot solve ODE of neural dynamics, but it seems that learning by SNN can be done easily. Machine learning using SNN is still undergoing various studies in developing fields, and BindsNET may play a major role.
Recommended Posts