hxtorch.spiking.modules.neuron

Implementing SNN modules

Classes

AELIF(size, experiment, leak, reset, …)

Layer of neurons with configurable dynamics up to adaptive exponential leaky integrate-and-fire complexity.

AnalogObservable(cadc, None] = None, madc, …)

Dataclass that can hold CADC and MADC data of an analog observable.

Bounds(lower, torch.Tensor]] =, upper, …)

Class defining bounds of a finite value range and how to deal with the bounds in simulation. :param lower: The lower bound. :param upper: The upper bound. :param device: The device, the tensors containing the bounds are transfered to. :param hardware_aware: When set to True, the saturation effect is considered in the backward pass of the simulation; Else, the backward function is set to be the identity function and torch.clamp() is used instead of a surrogate. :param surrogate: Callable that implements a surrogate function for the clamp function. Is needed in case of of a hardware aware backpropagation.

EventPropLIF(size, experiment, leak, reset, …)

HXBaseParameter(hardware_value, model_value)

HXTransformedModelParameter(model_value, …)

Handle(*args, **kwargs)

Factory for classes which are to be used as custom handles for observable data, depending on the specific observables a module deals with.

LI(size, experiment, leak, tau_mem, tau_syn, …)

Layer of leaky integrator neurons

LIF(size, experiment, leak, reset, …)

Layer of leaky integrate-and-fire neurons.

LIFObservables

alias of hxtorch.spiking.handle.Handle_current_membrane_cadc_membrane_madc_spikes

LIObservables

alias of hxtorch.spiking.handle.Handle_current_membrane_cadc_membrane_madc

MockParameter(mean, float, int], std, float, …)

Morphology()

Represents the internal structure of a neuron.

NeuronExp(size, experiment, leak, reset, …)

Neuron layer with exponential Euler integration scheme.

Population(*pop_args, **pop_kwargs)

RandomNoise(std, torch.Tensor]] = None, …)

Class defining gaussian random noise to mock the random noise of the membrane and adaptation state on hardware along the time axis.

ReadoutNeuronExp(size, experiment, leak, …)

Neuron layer with exponential Euler integration scheme.

ReadoutSource()

SingleCompartmentNeuron(size, …)

Neuron with a single iso-potential compartment.

SynapseHandle

alias of hxtorch.spiking.handle.Handle_graded_spikes

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

Functions

hxtorch.spiking.modules.neuron.superspike(input: torch.Tensor, alpha: float) → torch.Tensor
hxtorch.spiking.modules.neuron.warn(message, category=None, stacklevel=1, source=None)

Issue a warning, or maybe ignore it or raise an exception.