class brainpy.dnn.JitFPUniformLinear(num_in, num_out, prob, w_low, w_high, seed=None, sharding=None, mode=None, name=None, transpose=False, atomic=False)[source]#

Synaptic matrix multiplication with the just-in-time connectivity.

It performs the computation of:

\[y = x @ M\]

where \(y\) is the postsynaptic value, \(x\) the presynaptic variable, \(M\) the synaptic weights which has the fixed sparse connectivity and weights. Particularly, the connectivity in \(M\) is sampled from a fixed probability \(prob\), and at each connection, the synaptic value is sample from a uniform distribution \(U(w_{low}, w_{high})\).

  • num_in (int) – int. The number of the input feature. A positive integer.

  • num_out (int) – int. The number of the input feature. A positive integer.

  • prob (float) – float. The connectivity probability.

  • w_low (float) – float. The lowest value of the uniform distribution.

  • w_high (float) – float. The highest value of the uniform distribution.

  • seed (Optional[int]) – int. The random seed used to keep the reproducibility of the connectivity.

  • transpose (bool) – bool. Transpose the JIT matrix or not. Default False.

  • atomic (bool) – bool. Compute the post-synaptic value with the atomic summation. Default False. May be changed in the future.

  • sharding (Union[Sequence[str], Device, Sharding, None]) – The sharding strategy.

  • mode (Optional[Mode]) – The synaptic computing mode.

  • name (Optional[str]) – The synapse model name.


The function to specify the updating rule.