Code Monkey home page Code Monkey logo

pfa's Introduction

Tensor Decomposition Based Attention Module for Spiking Neural Networks

Haoyu Denga, Ruijie Zhub, Xuerui Qiua, Yule Duanua, Malu Zhanga,† and Liang-Jian Denga,†

aUniversity of Electronic Science and Technology of China, 611731, China

bUniversity of California, Santa Cruz, 95064, United States

Corresponding authors

If you have any questions, feel free to raise an issue or send a mail to [email protected]. I will respond to you as soon as possible.

img.png

This is the official repository for paper Tensor Decomposition Based Attention Module for Spiking Neural Networks

paper:[pdf]

CIFAR10/CIFAR100

How to Run

1. Prepare environment

A Docker environment is strongly recommended, but you can also use pip to prepare the environment. If you are not familiar with Docker, you can refer to the following link to know about docker:

English Tutorial

中文教程

1) Docker file

A docker file is provided in env directory. You can build the docker image and run the container with the following commands:

docker build -t pfa ./env
2) Docker image

We provide pre-build docker image on docker hub. You can pull the image with the following command:

docker pull risingentropy409/pfa

The environment is ready to use after you have the image.

3) pip

Use the following command to setup environment with pip:

pip install -r requirements.txt

NOTE: If your cuda version is above 12.0, you may modify cupy-cuda11x in requirements.txt to cupy-cuda12x

2.Run the code

Modify CIFAR/main.py according to your needs and run:

python main.py

FMNIST

This code is modified from the example code of the spikingjelly framework. We appreciate the authors' great contribution.

How to run

Just run:

python run.py

For more configuration, please refer to the code. The code is simple and clear.

Generation Tasks (FSVAE)

We conduct generation tasks based on FSVAE. The modified code is in the Generation folder. To run it, please refer to Generation/README.md

Citation

If you think our work is useful, please give us a warm citation!

@article{DENG2024111780,
title = {Tensor decomposition based attention module for spiking neural networks},
journal = {Knowledge-Based Systems},
volume = {295},
pages = {111780},
year = {2024},
issn = {0950-7051},
doi = {https://doi.org/10.1016/j.knosys.2024.111780},
url = {https://www.sciencedirect.com/science/article/pii/S0950705124004143},
author = {Haoyu Deng and Ruijie Zhu and Xuerui Qiu and Yule Duan and Malu Zhang and Liang-Jian Deng},
keywords = {Spiking neural network, Attention mechanism, Tensor decomposition, Neuromorphic computing}
}

pfa's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.