Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 366007686
  • Loading branch information
andsteing authored and Flax Authors committed Mar 31, 2021
1 parent 2a2efa8 commit 947b58b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions flax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@
from . import linen
from . import nn
from . import optim
# DO NOT REMOVE - Marker for internal logging.
2 changes: 1 addition & 1 deletion flax/nn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from jax import random



_module_stack = utils.CallStack()
_module_output_trackers = utils.CallStack()
_state_stack = utils.CallStack()
Expand Down Expand Up @@ -272,6 +271,7 @@ class Module(metaclass=_ModuleMeta):

def __new__(cls, *args, name=None, **kwargs):
warnings.warn("The `flax.nn` module is Deprecated, use `flax.linen` instead. Learn more and find an upgrade guide at https://github.com/google/flax/blob/master/flax/linen/README.md", DeprecationWarning)
# DO NOT REMOVE - Marker for internal logging.
if not _module_stack:
raise ValueError('A Module should only be instantiated directly inside'
' another module.')
Expand Down

0 comments on commit 947b58b

Please sign in to comment.