jaxsnn.event.types

Classes

EventPropSpike(time, idx, current)

Generic()

Abstract base class for generic types.

InputQueue(spikes, head)

LIFState(V, I)

OptState(opt_state, weights)

Spike(time, idx)

StepState(neuron_state, spike_times, …)

TestResult(loss, accuracy, t_first_spike, …)

TypeVar(name, *constraints[, bound, …])

Type variable.

WeightInput(input,)

WeightRecurrent(input, recurrent)

Functions

jaxsnn.event.types.NamedTuple(typename, fields=None, /, **kwargs)

Typed version of namedtuple.

Usage in Python versions >= 3.6:

class Employee(NamedTuple):
    name: str
    id: int

This is equivalent to:

Employee = collections.namedtuple('Employee', ['name', 'id'])

The resulting class has an extra __annotations__ attribute, giving a dict that maps field names to types. (The field names are also in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:

Employee = NamedTuple('Employee', name=str, id=int)

In Python versions <= 3.5 use:

Employee = NamedTuple('Employee', [('name', str), ('id', int)])