Spiking neuron integration for PyTorch
Project description
PyTorchSpiking
PyTorchSpiking provides tools for training and running spiking neural networks directly within the PyTorch framework. The main feature is pytorch_spiking.SpikingActivation, which can be used to transform any activation function into a spiking equivalent. For example, we can translate a non-spiking model, such as
torch.nn.Sequential(
torch.nn.Linear(5, 10),
torch.nn.ReLU(),
)
into the spiking equivalent:
torch.nn.Sequential(
torch.nn.Linear(5, 10),
pytorch_spiking.SpikingActivation(torch.nn.ReLU()),
)
Models with SpikingActivation layers can be optimized and evaluated in the same way as any other PyTorch model. They will automatically take advantage of PyTorchSpiking’s “spiking aware training”: using the spiking activations on the forward pass and the non-spiking (differentiable) activation function on the backwards pass.
PyTorchSpiking also includes various tools to assist in the training of spiking models, such as filtering layers.
If you are interested in building and optimizing spiking neuron models, you may also be interested in NengoDL. See this page for a comparison of the different use cases supported by these two packages.
Documentation
Check out the documentation for
Release history
0.1.0 (September 9, 2020)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytorch-spiking-0.1.0.tar.gz
.
File metadata
- Download URL: pytorch-spiking-0.1.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 233ec5eab820762e638d1d37e540814047fb31557431a7393f9916d1bbe36230 |
|
MD5 | 55224c401be1d1f0acbd1452b3037011 |
|
BLAKE2b-256 | f01dd0bd88ad304e673b6c6dcf241ea553fd9e220be93a12d330e96376fdfb6f |
File details
Details for the file pytorch_spiking-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pytorch_spiking-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd1b84f6b0c018144757aed97ecda1db9f5ee3e2d2188c1f86b426adc84cbd7 |
|
MD5 | 9f18ab9cbadd98eab38e9840a39d1c8d |
|
BLAKE2b-256 | 95d7f576cf8ccc7d9d48949ad9e70df4c1fd8a6f82cb3f33d405009d5ca4d8da |