2023-01-18 10:59:42 -08:00
|
|
|
``jax.random`` module
|
|
|
|
=====================
|
2019-02-13 19:21:55 -08:00
|
|
|
|
|
|
|
.. automodule:: jax.random
|
2020-11-20 16:41:32 -08:00
|
|
|
|
2023-09-21 11:13:23 -07:00
|
|
|
API Reference
|
|
|
|
-------------
|
2020-11-20 16:41:32 -08:00
|
|
|
|
2023-09-21 11:13:23 -07:00
|
|
|
Key Creation & Manipulation
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:toctree: _autosummary
|
|
|
|
|
|
|
|
key
|
|
|
|
key_data
|
|
|
|
wrap_key_data
|
|
|
|
fold_in
|
|
|
|
split
|
2024-03-08 09:06:00 -08:00
|
|
|
clone
|
2024-08-11 12:41:50 -07:00
|
|
|
PRNGKey
|
2023-09-21 11:13:23 -07:00
|
|
|
|
|
|
|
Random Samplers
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
.. Generate the list of callable members:
|
2020-11-20 16:41:32 -08:00
|
|
|
>>> from jax import random
|
2023-09-21 11:13:23 -07:00
|
|
|
>>> fns = (x for x in sorted(dir(random)) if callable(getattr(random, x)))
|
2020-11-20 16:41:32 -08:00
|
|
|
>>> print('\n'.join(' ' + x for x in fns)) # doctest: +SKIP
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:toctree: _autosummary
|
2023-04-07 22:53:53 -07:00
|
|
|
|
2022-06-03 15:11:29 -04:00
|
|
|
ball
|
2020-11-20 16:41:32 -08:00
|
|
|
bernoulli
|
|
|
|
beta
|
2023-10-19 15:15:54 +08:00
|
|
|
binomial
|
2023-05-01 18:22:55 -07:00
|
|
|
bits
|
2020-11-20 16:41:32 -08:00
|
|
|
categorical
|
|
|
|
cauchy
|
2023-02-24 10:00:05 +08:00
|
|
|
chisquare
|
2020-11-20 16:41:32 -08:00
|
|
|
choice
|
|
|
|
dirichlet
|
|
|
|
double_sided_maxwell
|
|
|
|
exponential
|
2023-02-24 10:00:05 +08:00
|
|
|
f
|
2020-11-20 16:41:32 -08:00
|
|
|
gamma
|
2022-06-03 15:11:29 -04:00
|
|
|
generalized_normal
|
2023-03-29 11:36:47 +08:00
|
|
|
geometric
|
2020-11-20 16:41:32 -08:00
|
|
|
gumbel
|
|
|
|
laplace
|
2022-03-21 08:33:11 -07:00
|
|
|
loggamma
|
2020-11-20 16:41:32 -08:00
|
|
|
logistic
|
2023-08-04 11:06:32 +08:00
|
|
|
lognormal
|
2020-11-20 16:41:32 -08:00
|
|
|
maxwell
|
2025-03-12 18:15:14 -04:00
|
|
|
multinomial
|
2020-11-20 16:41:32 -08:00
|
|
|
multivariate_normal
|
|
|
|
normal
|
2022-04-29 14:20:50 -04:00
|
|
|
orthogonal
|
2020-11-20 16:41:32 -08:00
|
|
|
pareto
|
|
|
|
permutation
|
|
|
|
poisson
|
|
|
|
rademacher
|
|
|
|
randint
|
2023-03-10 16:34:29 +08:00
|
|
|
rayleigh
|
2020-11-20 16:41:32 -08:00
|
|
|
t
|
2023-08-04 11:06:32 +08:00
|
|
|
triangular
|
2020-11-20 16:41:32 -08:00
|
|
|
truncated_normal
|
|
|
|
uniform
|
2023-03-21 11:13:40 +08:00
|
|
|
wald
|
2020-11-20 16:41:32 -08:00
|
|
|
weibull_min
|