{"id":21684593,"url":"https://github.com/nengo/keras-spiking","last_synced_at":"2025-04-12T07:51:45.198Z","repository":{"id":45757087,"uuid":"285836218","full_name":"nengo/keras-spiking","owner":"nengo","description":"Spiking neuron integration for Keras","archived":false,"fork":false,"pushed_at":"2025-03-18T17:52:18.000Z","size":13745,"stargazers_count":31,"open_issues_count":9,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-26T03:04:56.658Z","etag":null,"topics":["deep-learning","keras","python","spiking-neural-networks","tensorflow"],"latest_commit_sha":null,"homepage":"https://www.nengo.ai/keras-spiking/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nengo.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-07T13:30:55.000Z","updated_at":"2024-08-29T08:06:50.000Z","dependencies_parsed_at":"2024-11-25T16:16:23.321Z","dependency_job_id":"93d51019-e44e-415a-8b8c-68a93f9efe6d","html_url":"https://github.com/nengo/keras-spiking","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nengo%2Fkeras-spiking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nengo%2Fkeras-spiking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nengo%2Fkeras-spiking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nengo%2Fkeras-spiking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nengo","download_url":"https://codeload.github.com/nengo/keras-spiking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537005,"owners_count":21120690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","keras","python","spiking-neural-networks","tensorflow"],"created_at":"2024-11-25T16:16:13.212Z","updated_at":"2025-04-12T07:51:45.179Z","avatar_url":"https://github.com/nengo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://img.shields.io/pypi/v/keras-spiking.svg\n  :target: https://pypi.org/project/keras-spiking\n  :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/keras-spiking.svg\n  :target: https://pypi.org/project/keras-spiking\n  :alt: Python versions\n\n************\nKerasSpiking\n************\n\nKerasSpiking provides tools for training and running spiking neural networks\ndirectly within the Keras framework. The main feature is\n``keras_spiking.SpikingActivation``, which can be used to transform\nany activation function into a spiking equivalent. For example, we can translate a\nnon-spiking model, such as\n\n.. code-block:: python\n\n    inp = tf.keras.Input((5,))\n    dense = tf.keras.layers.Dense(10)(inp)\n    act = tf.keras.layers.Activation(\"relu\")(dense)\n    model = tf.keras.Model(inp, act)\n\ninto the spiking equivalent:\n\n.. code-block:: python\n\n    # add time dimension to inputs\n    inp = tf.keras.Input((None, 5))\n    dense = tf.keras.layers.Dense(10)(inp)\n    # replace Activation with SpikingActivation\n    act = keras_spiking.SpikingActivation(\"relu\")(dense)\n    model = tf.keras.Model(inp, act)\n\nModels with SpikingActivation layers can be optimized and evaluated in the same way as\nany other Keras model. They will automatically take advantage of KerasSpiking's\n\"spiking aware training\": using the spiking activations on the forward pass and the\nnon-spiking (differentiable) activation function on the backwards pass.\n\nKerasSpiking also includes various tools to assist in the training of spiking models,\nsuch as additional `regularizers\n\u003chttps://www.nengo.ai/keras-spiking/reference.html#module-keras_spiking.regularizers\u003e`_\nand `filtering layers\n\u003chttps://www.nengo.ai/keras-spiking/reference.html#module-keras_spiking.layers\u003e`_.\n\nIf you are interested in building and optimizing spiking neuron models, you may also\nbe interested in `NengoDL \u003chttps://www.nengo.ai/nengo-dl\u003e`_. See\n`this page \u003chttps://www.nengo.ai/keras-spiking/nengo-dl-comparison.html\u003e`_ for a\ncomparison of the different use cases supported by these two packages.\n\n**Documentation**\n\nCheck out the `documentation \u003chttps://www.nengo.ai/keras-spiking/\u003e`_ for\n\n- `Installation instructions\n  \u003chttps://www.nengo.ai/keras-spiking/installation.html\u003e`_\n- `More detailed example introducing the features of KerasSpiking\n  \u003chttps://www.nengo.ai/keras-spiking/examples/spiking-fashion-mnist.html\u003e`_\n- `API reference \u003chttps://www.nengo.ai/keras-spiking/reference.html\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnengo%2Fkeras-spiking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnengo%2Fkeras-spiking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnengo%2Fkeras-spiking/lists"}