Skip to content

Commit

Permalink
Merge pull request #1824 from marcvanzee:rtd-deprecated
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 424562713
  • Loading branch information
Flax Authors committed Jan 27, 2022
2 parents aca40ad + a7cf071 commit a6e7744
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 128 deletions.
8 changes: 4 additions & 4 deletions docs/design_notes/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ It also avoids a default value which would probably cause either the train step



## Functional Core and flax.nn
## Functional Core

The old NN api and functional core define functions rather than classes.
Therefore, there is no clear distinction between hyper parameters and call time arguments.
The only way to pre-determine the hyper parameters is by using `partial`.
Functional core defines functions rather than classes.
Therefore, there is no clear distinction between hyperparameters and call-time arguments.
The only way to pre-determine the hyperparameters is by using `partial`.
On the upside, there are no ambiguous cases where method arguments could also be attributes.
115 changes: 0 additions & 115 deletions docs/flax.nn.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,3 @@ For a quick introduction and short example snippets, see our `README
flax.training
flax.config
flax.errors

.. toctree::
:maxdepth: 1
:caption: (deprecated)

flax.nn (deprecated) <flax.nn>
2 changes: 1 addition & 1 deletion flax/core/flax_functional_engine.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"colab": {}
},
"source": [
"from flax import nn, struct"
"from flax import linen as nn, struct"
],
"execution_count": 2,
"outputs": []
Expand Down
4 changes: 2 additions & 2 deletions flax/linen/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Linen: A comfortable evolution of Flax

Linen is a rewrite of Flax Modules based on learning from our users and the broader JAX community. Linen improves on much of the former `flax.nn` API, such as submodule sharing and better support for non-trainable variables.
Moreover, Linen builds on a new "functional core", enabling direct usage of JAX transformations such as `vmap`, `remat` or `scan` inside your modules.
Linen is a neural network API developed based on learning from our users and the broader JAX community. Linen improves on much of the former `flax.nn` API (removed since v0.4.0), such as submodule sharing and better support for non-trainable variables.
Moreover, Linen builds on a "functional core", enabling direct usage of JAX transformations such as `vmap`, `remat` or `scan` inside your modules.

In Linen, Modules behave much closer to vanilla Python objects, while still letting you opt-in to the concise single-method pattern many of our users love.

Expand Down

0 comments on commit a6e7744

Please sign in to comment.