python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to check if a value is in an array while using jax
I have a negative sampling function that I want to use JAX's @jit but everything that I do makes it stop working.
The parameters are:
key: key to jax.random
ratings: a list of 3-tuples (user_id, item...
Júlio Guedes
Votes: 0
Answers: 1
JAX(XLA) vs Numba(LLVM) Reduction
Is it possible to make CPU only reductions with JAX comparable to Numba in terms of computation time?
The compilers come straight from conda:
$ conda install -c conda-forge numba jax
Here is a 1-d Nu...
DavidJ
Votes: 0
Answers: 1
Handle varying shapes in jax numpy arrays (jit compatible)
Important note: I need everything to be jit compatible here, otherwise my problem is trivial :)
I have a jax numpy array such as:
a = jnp.array([1,5,3,4,5,6,7,2,9])
First I filter it considering a va...

Valentin Macé
Votes: 0
Answers: 1
jax: sample many observations from random.choice with replacement between them
I'd like to pick two indices out of an array. These indices must not be the same.
One such sample can be obtained with:
random.choice(next(key), num_items, (2,), replace=False)
For performance reason...
lhk
Votes: 0
Answers: 1