-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(1) add more structure, e.g. list clickable layers with detailed signature on separate pages, instead of a monolithic wall of text. (2) Add drop-down TOC on the left, and some simple sections like linear / nonlinear layers etc. (3) Type rendering is improved following prior change introducting typing protocols. (4) All sphinx warnings are fixed, so we can now `fail_on_warning`, which will prevent silent errors / empty docs happening in the past. PiperOrigin-RevId: 429647336
- Loading branch information
Showing
14 changed files
with
218 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Batching -- using multiple devices | ||
============================================================ | ||
|
||
.. default-role:: code | ||
.. automodule:: neural_tangents._src.batching | ||
.. automodule:: neural_tangents | ||
:noindex: | ||
:members: batch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. default-role:: code | ||
|
||
Empirical -- finite NNGP and NTK | ||
====================================== | ||
|
||
.. automodule:: neural_tangents._src.empirical | ||
.. currentmodule:: neural_tangents | ||
|
||
Kernel functions | ||
-------------------------------------- | ||
Finite-width NNGP and/or NTK kernel functions. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
empirical_kernel_fn | ||
empirical_nngp_fn | ||
empirical_ntk_fn | ||
|
||
|
||
Linearization and Taylor expansion | ||
-------------------------------------- | ||
Decorators to Taylor-expand around function parameters. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
linearize | ||
taylor_expand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Monte Carlo Sampling | ||
====================================== | ||
|
||
.. default-role:: code | ||
.. automodule:: neural_tangents._src.monte_carlo | ||
.. automodule:: neural_tangents | ||
:members: monte_carlo_kernel_fn |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. default-role:: code | ||
|
||
Predict -- inference with NNGP and NTK or linearized networks | ||
============================================================= | ||
|
||
.. automodule:: neural_tangents._src.predict | ||
.. currentmodule:: neural_tangents.predict | ||
|
||
|
||
Prediction / inference functions | ||
-------------------------------------- | ||
Functions to make train/test set predictions given NNGP/NTK kernels or the linearized function. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
gradient_descent | ||
gradient_descent_mse | ||
gradient_descent_mse_ensemble | ||
gp_inference | ||
|
||
|
||
Utilities | ||
-------------------------------------- | ||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
max_learning_rate | ||
|
||
|
||
Helper classes | ||
-------------------------------------- | ||
Dataclasses and namedtuples used to return predictions. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
Gaussian | ||
ODEState |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,3 @@ jaxlib | |
ipykernel | ||
nbsphinx | ||
sphinx-autodoc-typehints | ||
# The next packages are for notebooks | ||
matplotlib | ||
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
.. default-role:: code | ||
|
||
Stax -- infinite networks (NNGP, NTK) | ||
====================================== | ||
|
||
.. automodule:: neural_tangents.stax | ||
|
||
|
||
Combinators | ||
-------------------------------------- | ||
Layers to combine multiple other layers into one. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
serial | ||
parallel | ||
|
||
|
||
Branching | ||
-------------------------------------- | ||
Layers to split outputs into many, or combine many into ones. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
FanOut | ||
FanInConcat | ||
FanInProd | ||
FanInSum | ||
|
||
|
||
Linear parametric | ||
-------------------------------------- | ||
Linear layers with trainable parameters. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
Dense | ||
Conv | ||
ConvLocal | ||
ConvTranspose | ||
GlobalSelfAttention | ||
|
||
|
||
Linear nonparametric | ||
-------------------------------------- | ||
Linear layers without any trainable parameters. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
Aggregate | ||
AvgPool | ||
Identity | ||
DotGeneral | ||
Dropout | ||
Flatten | ||
GlobalAvgPool | ||
GlobalSumPool | ||
ImageResize | ||
LayerNorm | ||
SumPool | ||
|
||
|
||
Elementwise nonlinear | ||
-------------------------------------- | ||
Pointwise nonlinear layers. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
ABRelu | ||
Abs | ||
Cos | ||
Elementwise | ||
ElementwiseNumerical | ||
Erf | ||
Exp | ||
ExpNormalized | ||
Gaussian | ||
Gelu | ||
Hermite | ||
LeakyRelu | ||
Rbf | ||
Relu | ||
Sigmoid_like | ||
Sign | ||
Sin | ||
|
||
|
||
Helper enums | ||
-------------------------------------- | ||
Enums for specifying layer properties. Strings can be used in their place. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
Padding | ||
PositionalEmbedding | ||
|
||
|
||
For developers | ||
-------------------------------------- | ||
Classes and decorators helpful for constructing your own layers. | ||
|
||
.. autosummary:: | ||
:toctree: _autosummary | ||
|
||
layer | ||
supports_masking | ||
requires | ||
Bool | ||
Diagonal |