Skip to content

Commit

Permalink
expose Rng
Browse files Browse the repository at this point in the history
  • Loading branch information
cgarciae committed Oct 28, 2023
1 parent d5d34f7 commit 7bddd53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions flax/experimental/nnx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
from .nnx.variables import Empty as Empty
from .nnx.variables import Intermediate as Intermediate
from .nnx.variables import Param as Param
from .nnx.variables import Rng as Rng
from .nnx.variables import Variable as Variable
from .nnx.variables import VariableMetadata as VariableMetadata
from .nnx.variables import with_metadata as with_metadata
2 changes: 2 additions & 0 deletions flax/experimental/nnx/nnx/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ class Intermediate(Variable[A]):


class Rng(Variable[jax.Array]):
tag: str

def __init__(
self,
value: jax.Array,
Expand Down

0 comments on commit 7bddd53

Please sign in to comment.