51 Commits

Author SHA1 Message Date
Matthew Johnson
fc0f875b02
improve ref to Tao's 3rd edition of Analysis I 2020-03-25 17:05:57 -07:00
Matthew Johnson
da9b52324a
remove incorrect sentence in notebook 2020-03-25 14:53:23 -07:00
Matthew Johnson
7e480fa923 add custom_jvp / vjp, delete custom_transforms 2020-03-21 22:08:03 -07:00
Matthew Johnson
7f8ce8ff3c fix test errors from previous commit 2020-03-19 11:33:00 -07:00
George Necula
2998a21505
Updated Common Gotchas (#2435)
* Minor update to docs; trigger readthedocs

* Updated Common Gotchas notebook

Handle errors explicitly, otherwise it is too hard to test the notebook by 'Run all'

* Added a section about pure functions to Common Gotchas
2020-03-19 06:55:43 +01:00
Matthew Johnson
7f0463e2c9
remove input shapes from params of some primitives (#2410)
Long, long ago, when JAX was first born, we realized that we couldn't
transpose this jaxpr:

  { lambda  ; a.
    let b = reduce_sum[ axes=(0,) ] a
    in b }

The problem was that the transpose of a reduce-sum is a broadcast, but
because jaxprs didn't have shape information available, we didn't know
what input shape to broadcast to!

Our hack was to have the primitives that required shape information for
transposition to acquire it into their parameters, so that we'd produce
jaxprs like this one:

  { lambda  ; a.
    let b = reduce_sum[ axes=(0,)
                        input_shape=(3,) ] a
    in b }

That's not only aesthetically unpleasant, but also it meant we were
limiting an (unused) capability of the system: ideally we should be able
to trace a reduce-sum jaxpr without specializing on shape information
(e.g. at the Unshaped level) and only require shape specialization for
transposition. (Good thing no one actually traces at Unshaped...)

But at long last @chr1sj0nes in #2299 added avals to jaxprs, so that
shape information (or whatever information with which the jaxpr was
specialized out of Python) is in the jaxpr itself. So we could finally
remove these shapes-in-params warts!

That's exactly what this commit does!

Co-authored-by: Roy Frostig <frostig@google.com>

Co-authored-by: Roy Frostig <frostig@google.com>
2020-03-13 07:13:29 -07:00
George Necula
61b430eeb4
Added more documentation for how to fix notebook build failures (#2404) 2020-03-12 10:59:30 +01:00
Matthew Johnson
cdf188af2f
add raises-exception notebook cell metadata (#2402) 2020-03-11 09:42:25 -07:00
Jordan Hoffmann
ffa03403c9
Add jnp vs np out of bounds indexing to Sharp Bits nb (#2378) 2020-03-10 17:53:43 -07:00
Lucas Theis
05e5ccfdd5
Minor fix to docs which mentioned IOHW where it should be OIHW (#2381) 2020-03-09 06:08:32 -07:00
joao guilherme
f6e1d01f94
JIT differentiate -> JIT compile (#2279) 2020-02-23 22:04:02 +01:00
Matthew Johnson
96b66ac976
fix typo in autodiff cookbook 2020-02-19 12:37:59 -08:00
George Necula
fcd949b695
Added blank line to autodiff cookbook to trigger an enumeration 2020-02-17 16:01:10 +01:00
Mathis Gerdes
3a0690fa11 Correct sign mistake in complex autodiff docs. 2020-02-17 14:28:56 +01:00
George Necula
370558def3 Removed a couple of slow notebooks from RTD auto-rendering.
Trying to address the timeouts in RTD rendering.

Also fixed bad itemized list in autodiff cookbook, and a few minor warnings:
Issue: #2092
2020-02-15 11:43:10 +01:00
Anselm Levskaya
28e802c6f1
Fix Gotchas notebook regarding control flow differentiation. (#2194) 2020-02-10 16:39:27 -08:00
George Necula
a955fd9dee Updated notebook that refered to freevars 2020-02-03 19:57:08 +01:00
Matthew Johnson
6b5ef898dc
fix autodiff cookbook np.allclose tuple bug (#2055) 2020-01-23 10:21:55 -08:00
Surya Bulusu
71323b5d02 changes loop_mjp(f, x, M) (#2013)
a minor change: we iterate over M and not S
2020-01-16 17:47:15 -08:00
John Mellor
fd6067471e Fix minor typo in Common_Gotchas_in_JAX.ipynb
Moved misplaced backtick
2020-01-02 07:43:59 -08:00
flowed
e0693fe649 Fix Typos 2019-12-30 11:27:12 -08:00
Matthew Johnson
f5723848d3
fix error in autodiff cookbook: 3x not 2x 2019-12-30 07:36:36 -08:00
David Bieber
30bede1f6a fix typo in autodiff cookbook (#1921) 2019-12-27 11:02:06 -08:00
Matthew Johnson
8dad859e04 streamline readme, add pmap 2019-12-14 10:32:04 -08:00
tamaranorman
26e863923a Support atrous conv in same padded convolution and add warning if use transposed convolution with same or valid padding. (#1806)
PiperOrigin-RevId: 283517237
2019-12-09 08:06:59 -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
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
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
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
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
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
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