Open TommyClausner opened 2 weeks ago
I tried to use spike_grad = snntorch.surrogate.LSO(slope=0.1) with snntorch.Synaptic(alpha=alpha, beta=beta, spike_grad=spike_grad)
spike_grad = snntorch.surrogate.LSO(slope=0.1)
snntorch.Synaptic(alpha=alpha, beta=beta, spike_grad=spike_grad)
and got the error message:
TypeError: StochasticSpikeOperator.forward() missing 1 required positional argument: 'variance'
When checking the source I have seen that in snntorch.surrogate the following function might return the wrong value:
snntorch.surrogate
def LSO(slope=0.1): """Leaky spike operator gradient enclosed with a parameterized slope.""" slope = slope def inner(x): return StochasticSpikeOperator.apply(x, slope) return inner
I think instead of returning StochasticSpikeOperator.apply(x, slope) it should return LeakySpikeOperator.apply(x, slope)
StochasticSpikeOperator.apply(x, slope)
LeakySpikeOperator.apply(x, slope)
Description
I tried to use
spike_grad = snntorch.surrogate.LSO(slope=0.1)
withsnntorch.Synaptic(alpha=alpha, beta=beta, spike_grad=spike_grad)
and got the error message:
TypeError: StochasticSpikeOperator.forward() missing 1 required positional argument: 'variance'
When checking the source I have seen that in
snntorch.surrogate
the following function might return the wrong value:I think instead of returning
StochasticSpikeOperator.apply(x, slope)
it should returnLeakySpikeOperator.apply(x, slope)