To efficiently communicate between tokens, we incorporate the mechanism of LIF neurons into the MLP models, and achieve better accuracy without extra FLOPs.
Paper: Wenshuo Li, Hanting Chen, Jianyuan Guo, Ziyang Zhang, Yunhe Wang. Brain-inspired Multilayer Perceptron with Spiking Neurons. arxiv 2203.14679.
A block of SNN-MLP is shown below:
Dataset used: ImageNet2012
SNN-MLP
├── eval.py # inference entry
├── fig
│ └── snnmlp.png # the illustration of snn_mlp network
├── readme.md # Readme
└── src
├── dataset.py # dataset loader
└── snn_mlp.py # snn_mlp network
After installing MindSpore via the official website, you can start evaluation as follows:
# infer example
python eval.py --dataset_path [DATASET] --platform GPU --checkpoint_path [CHECKPOINT_PATH] --model [snnmlp_t|snnmlp_s|snnmlp_b] #GPU
checkpoint can be downloaded at https://download.mindspore.cn/model_zoo/research/cv/snn_mlp/.
result: {'acc': 0.8185} ckpt= ./SNNMLP_T.ckpt
In dataset.py, we set the seed inside "create_dataset" function. We also use random seed in train.py.
Please check the official homepage.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。