We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I noticed that you are reusing the same key in e.g. cell 23 of main/src/notebooks/jax_tutorials/chapter_5_vmap_pmap.ipynb
main/src/notebooks/jax_tutorials/chapter_5_vmap_pmap.ipynb
key, subkey = random.split(key) rotate = random.randint(key, shape=[batch_size], minval=0, maxval=2)
Looks like you shall be using the subkey in random.randint, not the original key. The way it is now subkey is never used.
random.randint
The text was updated successfully, but these errors were encountered:
Another example is cell 24, where you are practically reusing the same key in the for loop, by doing this several times:
key=random.PRNGKey(0)
It would be better if you seed the PRNG once and split the key in every iteration as in :
key = random.PRNGKey(42) for _ in range(3): key, subkey = random.split(key) a = random.normal(key=subkey) print(a)
Output:
1.3694694 -0.19947024 -2.2982783
Sorry, something went wrong.
No branches or pull requests
Hi,
I noticed that you are reusing the same key in e.g. cell 23 of
main/src/notebooks/jax_tutorials/chapter_5_vmap_pmap.ipynb
Looks like you shall be using the subkey in
random.randint
, not the original key. The way it is now subkey is never used.The text was updated successfully, but these errors were encountered: