From 45e96795e9328f7119c4a760ecb5cdeb5c738f5a Mon Sep 17 00:00:00 2001 From: "Dr. Alexander Henkes" <62153181+ahenkes1@users.noreply.github.com> Date: Sun, 24 Sep 2023 09:25:07 +0200 Subject: [PATCH] Update snntorch.surrogate.rst The default surrogate gradient is now ATan instead of Heaviside. This was updated in the tutorials, but not in the docs for surrogate. --- docs/snntorch.surrogate.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/snntorch.surrogate.rst b/docs/snntorch.surrogate.rst index 10a5820d..c404dbdb 100644 --- a/docs/snntorch.surrogate.rst +++ b/docs/snntorch.surrogate.rst @@ -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. @@ -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::