2127 Commits

Author SHA1 Message Date
Peter Hawkins
f0d9333379
Document functions in jax.nn. (#1795) 2019-12-02 14:21:10 -05:00
George Necula
2b0b04fcad Merge remote-tracking branch 'upstream/master' into jaxpr_pp 2019-11-28 08:56:00 +01:00
Matthew Johnson
9a8523603c Add experimental rematerialization decorator
We want to allow users to control how reverse-mode autodiff saves values
from the forward pass. In particular, we want it to be easy to signal
that a function shouldn't have any of its intermediate residuals stored
for the backward pass, and instead those values should be recomputed
from the function's saved inputs. (This feature is especially handy for
accelerators on which memory access is much more expensive than FLOPs
are.) In JAX terms, since we implement reverse-mode as a composition of
forward-mode, partial evaluation, and transposition, we want users to
control how partial evaluation behaves.

See https://github.com/google/jax/pull/1749 for more.

Co-authored-by: Dougal Maclaurin <dougalm@google.com>
2019-11-27 19:52:24 -08:00
George Necula
b0ffbaf1f6 Fixed also a notebook that has gone stale 2019-11-27 07:26:46 +01:00
George Necula
8777864c96 Minor edits 2019-11-24 20:29:44 +01:00
George Necula
b12a8019c8 Update docs/notebooks/JAX_pytrees.ipynb
Co-Authored-By: Stephan Hoyer <shoyer@google.com>
2019-11-24 20:29:29 +01:00
George Necula
4e89d43a75 Added JAX pytrees notebook
Also added docstrings to the tree_util module.
2019-11-24 20:29:07 +01:00
Skye Wanderman-Milne
6f3cb1c3ee Add jax.devices(), etc. to the docs. 2019-11-22 11:03:42 -08:00
Peter Hawkins
c60f3fd65d
Minor documentation fixes. (#1734) 2019-11-21 09:51:26 -05:00
Stephan Hoyer
ee29705712
Add jax.scipy.ndimage to online docs (#1724) 2019-11-20 12:35:10 -08:00
Peter Buchlovsky
9d1204689f Fix typo 2019-11-20 08:53:01 -08:00
Peter Buchlovsky
410ebfeb1c Fix typo 2019-11-20 08:52:46 -08:00
George Necula
397a244e7f
Merge pull request #1706 from gnecula/loops
An implementation of an experimental syntactic sugar for 'for' and `while` loops and conditionals.
2019-11-18 12:17:59 +01:00
Anselm Levskaya
f882359511
fix lax.scan notes in gotchas notebook
Note that lax.scan is now jittable and differentiable in the Gotchas notebook.
2019-11-17 00:19:24 -08:00
George Necula
d24c374d59 An implementation of an experimental syntactic sugar for 'for' loops.
See description in jax/experimental/loops.py.
2019-11-16 17:23:40 +01:00
George Necula
c6d3270512 Fixed tests for X64 2019-11-14 12:54:30 +01:00
Trevor Cai
340d82e93e [doc] Note that building jaxlib from source isn't always necessary (#1654)
* [doc] Note that building jaxlib from source isn't always necessary

Building jaxlib from source is time-consuming and the source of most
pain for building JAX. It's also not necessary (in my experience) for
pure-Python changes.

This commit adds notes to the 'building from source' documentation to
make this explicit.

* Move ``jaxlib`` skip instructions to top
2019-11-13 13:25:39 -05:00
Matthew Johnson
7a9ea8a006
Merge pull request #1582 from sharadmv/custom-interpreter
Add custom interpreter notebook
2019-11-08 13:13:24 -08:00
Sharad Vikram
7bc2b0878a Update description of eqn.parmas 2019-11-08 13:11:17 -08:00
Sharad Vikram
1f40c9c4d2 Fix writing suggestions from mattjj 2019-11-03 15:54:05 -08:00
Stephan Hoyer
e6ad9c29da
Docstring fixss for lax.custom_linear_solve (#1616)
Also add a new section for the np.fft module. These functions were previously
not appearing in the docs, because fftn is not exposed as np.fftn but only as
np.fft.fftn.
2019-11-01 09:04:44 -07:00
Peter Hawkins
f7a44523be
Add some type helpers to lax_numpy. (#1593)
Prefer to use jax.numpy type helpers rather than numpy type helpers in various places.
Cleanup in preparation for adding bfloat16 support to jax.
2019-10-29 20:53:20 -04:00
Stephan Hoyer
5bcbce744e
Support closures in all arguments of lax.custom_root (#1570)
* WIP: linear solvers

* Draft of lax.linear_solve

* Refactor pytree munging inside lax.root.

The primitive's implementation and JVP rules are now 100% pytree free.

* Fixup linear_solve

* Linearize multiple times in _root_jvp to avoid zeros

* fix deftraced

* add a symmetric argument

* Fixup float64; add a test for symmetric/non-symmetric

* test zeros in linear_solve_jvp

* Revisions per review

* Adjust signature of linear_solve

* restore botched test

* variable names

* WIP: root solve jaxpr

* WIP more tests

* rewrite root

* Root works with jaxprs

* root -> custom_root

* WIP undefined tangent

* Delayed undefined JVP errors

* use raise_on_undefined_tangents inside define_implicit_gradient

* more tests on jvps with undefined tangents

* Remove define_implicit_gradient

* Support closures in custom_root

* revert api-test

* another test

* jit tests

* spelling
2019-10-29 16:00:00 -07:00
George Necula
8880e262b0
Use redthedocs links for Colabs (#1572)
Steer the documentation readers to readthedocs.
Also, minor fixes to the wording of How_jax_primitives_work, suggested by Dougal
2019-10-29 08:53:35 +01:00
Sharad Vikram
e2e4e6e955 Fix title toc structure 2019-10-28 13:59:16 -07:00
Sharad Vikram
5d56999913 Add custom interpreter notebook 2019-10-28 13:58:55 -07:00
George Necula
0ffcd769ef
Add sklearn to Travis, for documentation building. (#1547)
* Add sklearn to Travis, for documentation building.
* Add score_matching to auto-built notebooks
2019-10-21 23:24:16 +02:00
Peter Hawkins
c485a3cc50
Remove stale reference to lapax.py. (#1546)
Add some missing documentation references.
2019-10-21 13:47:36 -04:00
Peter Hawkins
9c23a95e6a
Add i0e and i1e Bessel functions. (#1541) 2019-10-21 10:30:55 -04:00
George Necula
eae59d0b2c
Moved all notebooks to docs/notebooks. (#1493)
* Moved all notebooks to docs/notebooks.

Now all notebooks are in the same place, thus all are subject
to auto-doc generation at readthedocs.io and to automated testing
with travis.

Some notebooks are too slow, exclude them at docs/conf.py:exclude_patterns.

Cleanup a bit the section headings in notebooks so that they show
up well in readtehdocs.io.

* Increase the cell timeout for executing notebooks
* Exclude also the neural network notebook from auto-generation (timing out)
* Disable the score_matching notebook from auto-doc (travis does not have sklearn)
2019-10-17 08:58:25 +02:00
Trevor Cai
c50495b272 Fix List rendering in RTD for primitives.ipynb (#1501)
Colab doesn't require a newline before unordered list in Markdown; RTD
does.
2019-10-14 10:55:13 -07:00
Peter Hawkins
78132c150d Document all_to_all and ppermute. 2019-10-10 15:19:17 -04:00
George Necula
b2493a1ede
Merge pull request #1474 from gnecula/documentation
Create developer documentation.
2019-10-10 09:03:01 +02:00
George Necula
a9d9504348 Fixes to the documentation
* Included "Building from source" in README.md
* Added references from docs/README.md to docs/developer.rst
2019-10-09 17:45:09 +02:00
George Necula
e42c010605 Create developer documentation.
* Moved out of README.md some developer-only stuff to docs/developer.rst.
    * Added documentation about building the documentation
2019-10-09 17:24:01 +02:00
George Necula
c9d984b328 Fixed the readthedocs documentation build
Had to extend the docs/requirements.txt file to install
matplotlb (needed by the Gotchas notebook) and ".",
needed by everything. This results in a reduction
of the sphinx warnings from 3300 to 1200!
2019-10-09 14:43:42 +02:00
George Necula
41457633cc Increase readthedocs/nbsphinx timeout
It seems tht RTD is timing out when compiling the How_JAX_primitives_work noteboook.
2019-10-07 18:07:55 +02:00
George Necula
a5063ee68b
Merge pull request #1423 from gnecula/colabs
Added How_JAX_primitives_work colab
2019-10-07 14:59:37 +02:00
George Necula
c4e4199508 Fix typo in notebook JSON (#1441)
Perhaps this is the reason why readthedocs does not show the link to the notebook?
2019-10-04 08:38:36 -07:00
George Necula
73144fafb5
Update docs/notebooks/How_JAX_primitives_work.ipynb
Co-Authored-By: James Bradbury <jekbradbury@google.com>
2019-10-04 11:58:07 +02:00
George Necula
ef886c7fcc
Update docs/notebooks/How_JAX_primitives_work.ipynb
Co-Authored-By: James Bradbury <jekbradbury@google.com>
2019-10-04 11:56:06 +02:00
Roy Frostig
db3b0dd036 fix missing delimiter in notebook source 2019-10-03 14:02:45 -07:00
George Necula
0fdf377343 Switched testing to using sphinx (part of the documentation generation) 2019-10-03 20:54:28 +02:00
George Necula
57e39ce938 Added support for testing Colab notebooks.
Testing is done by running "jupyter nbconvert --to notebook" and
then parsing the resulting notebook to look for errors.

One can declare expected errors, and the test will fail if those
are missing.

In the process of doig this, found and fixed a bug in the autodiff_cookbook
notebook.
2019-10-03 20:07:49 +02:00
George Necula
7bc0f70f87 Fix the title to show nicely in sphinx 2019-10-03 11:59:51 +02:00
George Necula
75c2236063 Addressed comments for the Colab.
* Cleaned up use of section levels
* Renamed ma to multiply_add and sq_add to square_add
* Other minor clarifications
* Separated the Colabs into Tutorials and Advanced Tutorials
2019-10-03 11:20:04 +02:00
George Necula
454320e9c9 Added How_JAX_primitives_work colab 2019-10-02 14:42:01 +02:00
Stephan Hoyer
08254fe5bc Fixup colab notebook URLs 2019-09-30 11:12:01 -07:00
Stephan Hoyer
9bd7330e1f
Notebooks on RTD (#1121) 2019-09-30 11:00:02 -07:00
Peter Hawkins
454cb4f6e9 Implement jax.scipy.linalg.lu_solve. 2019-09-05 09:59:47 -04:00