AllToAll

AllToAll#

class brainpy.dnn.AllToAll(num_pre, num_post, weight, sharding=None, include_self=True, mode=None, name=None)[source]#

Synaptic matrix multiplication with All2All connections.

Parameters:
  • num_pre (int) – int. The number of neurons in the presynaptic neuron group.

  • num_post (int) – int. The number of neurons in the postsynaptic neuron group.

  • weight (Union[float, TypeVar(ArrayType, Array, Variable, TrainVar, Array, ndarray), Callable]) – The synaptic weights.

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

  • include_self (bool) – bool. Whether connect the neuron with at the same position.

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

  • name (Optional[str]) – str. The object name.

update(pre_val)[source]#

The function to specify the updating rule.