rockpool.nn.layers.spike_ads

Implement the layer for the NetworkADS (Arbitrary Dynamical System), which is capable of learning an arbitrary dynamical system.

Functions

argwhere(data)

Accelerated argwhere function

clip_scalar(val, f_min, f_max)

Accelerated scalar clip function

clip_vector(v, f_min, f_max)

Accelerated vector clip function

discretize(W, base_weight)

full_nan(shape)

min_argmin(data)

Accelerated function to find minimum and location of minimum

neuron_dot_v(t, V, dt, I_s_F, I_s_S, I_kDte, ...)

quantize_weights_dynapse_II(N, M[, ...])

@brief Function that discretizes a given continuous weight matrix respecting the constraints of the DYNAP-SE II. The constraints: - The development board has 1 chip with 4 cores and 256 neurons per core. - Each neuron on the core has 64 synapses with 2^4 distinctive weights and a sign bit. - A core can be configured to sacrifice 3 out of 4 neurons to allocate the synapses of the 192 freed neurons to the remaining 64 neurons, effectively giving each of the 64 neurons 256 synapses. This enables the implementation of more dense connection matrices The function first determines the number of cores in "dense mode" that can be used to satisfy the number of neurons needed in the matrix. Let this be denoted by X. After that, the weight matrix is discretized to 4 bits (plus sign bit). Following that, the X*64 neurons with the highest number of non-zero incoming connections are selected and the needed number of weights with lowest absolute value are set to 0. Following that, the rest of the neurons having only 64 synapses are considered. For these neurons, the lowest weights are set to zero so that the constraint is satisfied. @params N : int : Number of neurons M : np.ndarray : Matrix to be quantized num_synapses_available : [None, np.ndarray] Useful if a more complex architecture is used and specifying the FFwd matrix is not enough. This vector must hold N entries that each specify the number of synapses available per neuron. plot : bool : Indicates if the matrices should be plotted.

rep_to_net_size(data, size)

Repeat some data to match the layer size

syn_dot_I_pre(I, dt_syn, I_spike)

Classes

RecFSSpikeADS(weights_fast, weights_slow, ...)

Implement the layer for the NetworkADS (Arbitrary Dynamical System), which is capable of learning an arbitrary dynamical system.