Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cite A Spike In Performance in SpikingActivation #30

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
timeout-minutes: 30
steps:
- uses: nengo/nengo-bones/actions/setup@main
with:
python-version: "3.10"
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
Expand All @@ -38,7 +40,7 @@ jobs:
- script: test
coverage-name: oldest
tf-version: tensorflow==2.3.4
python: "3.7"
python: "3.8"
fail-fast: false
env:
TF_VERSION: ${{ matrix.tf-version || 'tensorflow' }}
Expand Down
3 changes: 2 additions & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
KerasSpiking license
********************

Copyright (c) 2020-2023 Applied Brain Research
Copyright (c) 2020-2024 Applied Brain Research

**ABR License**

Expand All @@ -26,3 +26,4 @@ please contact `<[email protected]>`_.
If you have any technical support questions, please post them on the ABR
community forums at `<https://forum.nengo.ai/>`_ or contact
`<[email protected]>`_.

5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"sphinx.ext.todo",
"nbsphinx",
"nengo_sphinx_theme",
"nengo_sphinx_theme.ext.backoff",
"nengo_sphinx_theme.ext.sourcelinks",
"notfound.extension",
"numpydoc",
Expand Down Expand Up @@ -90,7 +89,7 @@

project = "KerasSpiking"
authors = "Applied Brain Research"
copyright = "2020-2023 Applied Brain Research"
copyright = "2020-2024 Applied Brain Research"
version = ".".join(keras_spiking.__version__.split(".")[:2]) # Short X.Y version
release = keras_spiking.__version__ # Full version, with tags

Expand Down Expand Up @@ -121,7 +120,7 @@
var _paq = window._paq = window._paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.appliedbrainresearch.com"]);
_paq.push(["setDomains", ["*.appliedbrainresearch.com","*.edge.nengo.ai","*.forum.nengo.ai","*.labs.nengo.ai","*.nengo.ai"]]);
_paq.push(["setDomains", ["*.appliedbrainresearch.com","*.edge.nengo.ai","*.forum.nengo.ai","*.nengo.ai"]]);
_paq.push(["enableCrossDomainLinking"]);
_paq.push(["setDoNotTrack", true]);
_paq.push(['trackPageView']);
Expand Down
18 changes: 16 additions & 2 deletions keras_spiking/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class SpikingActivationCell(KerasSpikingCell):
spiking output will be the same as the integral of the base activation output).
Note that if the base activation is outputting a negative value then the spikes
will have height ``-1/dt``. Multiple spikes per timestep are also possible, in
which case the output will be ``n/dt`` (where ``n`` is the number of spikes).
which case the output will be ``n/dt`` (where ``n`` is the number of spikes). [1]_

Notes
-----
Expand Down Expand Up @@ -256,6 +256,13 @@ class SpikingActivationCell(KerasSpikingCell):
kwargs : dict
Passed on to `tf.keras.layers.Layer
<https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer>`_.

References
----------
.. [1] Voelker, A. R., Rasmussen, D., & Eliasmith, C. (2020). A Spike in
Performance: Training Hybrid-Spiking Neural Networks with Quantized Activation
Functions. arXiv preprint arXiv:2002.03553.
(https://export.arxiv.org/abs/2002.03553)
"""

def __init__(
Expand Down Expand Up @@ -387,7 +394,7 @@ class SpikingActivation(KerasSpikingLayer):
spiking output will be the same as the integral of the base activation output).
Note that if the base activation is outputting a negative value then the spikes
will have height ``-1/dt``. Multiple spikes per timestep are also possible, in
which case the output will be ``n/dt`` (where ``n`` is the number of spikes).
which case the output will be ``n/dt`` (where ``n`` is the number of spikes). [1]_

When applying this layer to an input, make sure that the input has a time axis
(the ``time_major`` option controls whether it comes before or after the batch
Expand Down Expand Up @@ -444,6 +451,13 @@ class SpikingActivation(KerasSpikingLayer):
kwargs : dict
Passed on to `tf.keras.layers.Layer
<https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer>`_.

References
----------
.. [1] Voelker, A. R., Rasmussen, D., & Eliasmith, C. (2020). A Spike in
Performance: Training Hybrid-Spiking Neural Networks with Quantized Activation
Functions. arXiv preprint arXiv:2002.03553.
(https://export.arxiv.org/abs/2002.03553)
"""

def __init__(
Expand Down
2 changes: 1 addition & 1 deletion keras_spiking/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
if dev is not None:
version += ".dev%d" % dev # pragma: no cover

copyright = "Copyright (c) 2020-2023 Applied Brain Research"
copyright = "Copyright (c) 2020-2024 Applied Brain Research"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
requires = ["setuptools<64", "wheel"]

[tool.black]
target-version = ['py36']
target-version = ['py38']

[tool.isort]
profile = "black"
Expand Down
4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# Automatically generated by nengo-bones, do not edit this file directly

import io
Expand Down Expand Up @@ -75,7 +73,7 @@ def read(*filenames, **kwargs):
"optional": optional_req,
"tests": tests_req,
},
python_requires=">=3.6",
python_requires=">=3.8",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
Expand Down
Loading