This code can be used as the supplemental material for the paper: "A Hybrid Spiking Recurrent Neural Network on Hardware for Efficient Emotion Recognition". (Published on IEEE AICAS, June, 2022).
C. Zou, X. Cui, Y. Kuang, Y. Wang, and X. Wang, "A Hybrid Spiking Recurrent Neural Network on Hardware for Efficient Emotion Recognition," 2022 IEEE 4th International Conference on Artificial Intelligence Circuits and Systems (AICAS), 2022, pp. 1-4, doi: xxx.
- This supplemental material gives a reproduction function of training and testing experiments of vanillaRNN, LSTM, Text-CNN and proposed spiking RNN (SRNN) in our paper. Two kinds of emotion recognition datasets with different sentence lengths (also in English and Chinese language) are considered.
README.md
- this readme file.Cars
- the workspace folder fornetworks
on the Car dataset withtime step = 30
.Movies
- the workspace folder fornetworks
on the Movie dataset withtime step = 500
.
- python 3.5 (https://www.python.org/ or https://www.anaconda.com/)
- pytorch 0.4.1 (https://pytorch.org/)
- torchtext 0.3.1, glove.6B
- CPU: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
- GPU: Tesla V100
- Movies: Large Movie Review Dataset, preprocessing, reference
- Cars: dataset, preprocessing, reference
for example (networks training and testing, Movies dataset):
$ cd Movies
$ python movies_main.py
$ python text_cnn.py
for example (networks training and testing, Cars dataset):
$ cd Cars
$ python cars_main.py
$ python text_cnn.py
- You can run the
plot_sop.py
andplot_sparsity.py
to get illustration information.
Please refer to our paper for more information.
- There might be a little difference of results for multiple training repetitions, because of the randomization.
- Please feel free to reach out here or email: 1801111301@pku.edu.cn, if you have any questions or difficulties. I'm happy to help guide you.