Skip to content
Advertisement

Tag: jax

Why does GPU memory increase when recreating and reassigning a JAX numpy array to the same variable name?

When I recreate and reassign a JAX np array to the same variable name, for some reason the GPU memory nearly doubles the first recreation and then stays stable for subsequent recreations/reassignments. Why does this happen and is this generally expected behavior for JAX arrays? Fully runnable minimal example: https://colab.research.google.com/drive/1piUvyVylRBKm1xb1WsocsSVXJzvn5bdI?usp=sharing. For posterity in case colab goes down: Thank you! Answer

JAX: Getting rid of zero-gradient

Is there a way how to modify this function (MyFunc) so that it gives the same result, but its derivative is not zero gradient? EDIT: Similar function which doesn’t give zero gradient – but it doesn’t return 30/20/10 Answer The gradient of your function is zero because this is the correct result for the gradient as your function is defined.

Not able to install jaxlib

I am trying to install jaxlib on my windows 10 by the following command which I found on the documentation.. pip install jaxlib It shows the following error Answer Jaxlib is not supported on windows you can see it here.. https://github.com/google/jax/issues/438

Advertisement