Skip to content

Commit

Permalink
Merge pull request #3343 from chiamp:haiku_upgrade
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 565796217
  • Loading branch information
Flax Authors committed Sep 15, 2023
2 parents 654ae1a + 089f237 commit 5d846a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guides/haiku_migration_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ The Flax team recommends a more Module-centric approach that uses `__call__` to

model = hk.transform_with_state(forward)

params, state = model.init(PRNGKey(0), jax.numpy.ones((1, 64)))
params, state = model.init(random.key(0), jax.numpy.ones((1, 64)))

---

Expand All @@ -906,5 +906,5 @@ The Flax team recommends a more Module-centric approach that uses `__call__` to
return output

model = FooModule()
variables = model.init(PRNGKey(0), jax.numpy.ones((1, 64)))
variables = model.init(random.key(0), jax.numpy.ones((1, 64)))
params, counter = variables['params'], variables['counter']

0 comments on commit 5d846a5

Please sign in to comment.