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

Update snntorch.surrogate.rst #239

Merged
merged 1 commit into from
Sep 24, 2023
Merged
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: 2 additions & 2 deletions docs/snntorch.surrogate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ snntorch.surrogate

By default, PyTorch's autodifferentiation tools are unable to calculate the analytical derivative of the spiking neuron graph.
The discrete nature of spikes makes it difficult for ``torch.autograd`` to calculate a gradient that facilitates learning.
:mod:`snntorch` overrides the default gradient by using :mod:`snntorch.LIF.Heaviside`.
:mod:`snntorch` overrides the default gradient by using :mod:`snntorch.surrogate.ATan`.

Alternative gradients are also available in the :mod:`snntorch.surrogate` module.
These represent either approximations of the backward pass or probabilistic models of firing as a function of the membrane potential.
Expand All @@ -29,7 +29,7 @@ How to use surrogate
^^^^^^^^^^^^^^^^^^^^^^^^

The surrogate gradient must be passed as the ``spike_grad`` argument to the neuron model.
If ``spike_grad`` is left unspecified, it defaults to :mod:`snntorch.neurons.Heaviside`.
If ``spike_grad`` is left unspecified, it defaults to :mod:`snntorch.surrogate.ATan`.
In the following example, we apply the fast sigmoid surrogate to :mod:`snntorch.Synaptic`.

Example::
Expand Down
Loading