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
In the following example, a and b are kept in memory during the entire calculation. However, they are only needed at the very end of the backward pass. A memory efficient implementation would be to save them on disk after c = a * b, and to read them back from the disk whenever needed in the backward pass. Is it possible to realize this with jax? Or is it possible to define an array class similar to an H5 dataset while it is still traceable by jax? Thank you in advance.
def foo(a, b):
c = a * b
return fun(c)
g = jax.grad(foo, 0) (a, b)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear developers,
In the following example,
a
andb
are kept in memory during the entire calculation. However, they are only needed at the very end of the backward pass. A memory efficient implementation would be to save them on disk afterc = a * b
, and to read them back from the disk whenever needed in the backward pass. Is it possible to realize this with jax? Or is it possible to define an array class similar to an H5 dataset while it is still traceable by jax? Thank you in advance.Beta Was this translation helpful? Give feedback.
All reactions