You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently learnt that, to verify if the random function is working alright one needs to also plot the histogram graph of the particular function along side the histogram graph of a back-end function for a large number of outputs to verify if they look similar.
I had pushed a Maxwell function that passed all the tests. but when I plotted the histogram graph as explained above they looked very different. The graph is as shown bellow,
The code for the same is mentioned in the next section.
Steps to Reproduce Bug
`%matplotlib inline
import matplotlib
import ivy
import jax
from ivy.functional.frontends.jax.random import _get_seed
current function in Ivy repository
def maxwell_current(key, shape=None, dtype="float64"):
seed = _get_seed(key)
# generate uniform random numbers between 0 and 1
z = ivy.random_uniform(seed=seed, shape=shape, dtype=dtype)
# applying inverse transform sampling
x = (z**2) * ivy.exp(-(z**2) / 2)
return x
Bug Explanation
I recently learnt that, to verify if the random function is working alright one needs to also plot the histogram graph of the particular function along side the histogram graph of a back-end function for a large number of outputs to verify if they look similar.
I had pushed a Maxwell function that passed all the tests. but when I plotted the histogram graph as explained above they looked very different. The graph is as shown bellow,
The code for the same is mentioned in the next section.
Steps to Reproduce Bug
`%matplotlib inline
current function in Ivy repository
edited version
Environment
In general, in colab.
Ivy Version
v1.1.9
Backend
Device
No response
The text was updated successfully, but these errors were encountered: