- class brainpy.math.jitconn.event_mv_prob_uniform(events, w_low, w_high, conn_prob, seed=None, *, shape, transpose=False, outdim_parallel=True)#
Perform the \(y=M@v\) operation, where \(M\) is just-in-time randomly generated with a uniform distribution for its value.
This operator support
pmap()etc. transformations on CPU and GPU devices.
This API may change in the future.
In this operation, \(M\) is the random matrix with a connection probability conn_prob, and at each connection the value is the same scalar weight.
transpose=True, we perform an operation of \(y=M^T@v\).
Note that the just-in-time generated \(M\) (transpose=False) is different from the generated \(M^T\) (transpose=True).
If you pursue the same \(M\) and \(M^T\) when performing the just-in-time matrix generation, you should set
outdim_parallel=True, with the sacrifice of the speed compared with
vector (Array, ndarray) – The vector.
w_low (float) – Lower boundary of the output interval.
w_high (float) – Upper boundary of the output interval.
conn_prob (float) – The connection probability.
seed (int) – The random number generation seed.
transpose (bool) – Transpose the random matrix or not.
outdim_parallel (bool) – Perform the parallel random generations along the out dimension or not. It can be used to set the just-in-time generated :math:M^T: is the same as the just-in-time generated \(M\) when
out – The output of \(y = M @ v\).
- Return type: