Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
Update on zygote and refreshing. (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlperla authored and arnavs committed Oct 10, 2019
1 parent f949c76 commit aa925a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/rst/more_julia/optimization_solver_packages.rst
Expand Up @@ -289,9 +289,9 @@ with 1 million dimensions, solved in a few seconds.
Caution: while Zygote is the most exciting reverse-mode AD implementation in Julia, it has many rough edges.

- If you write a function, take its gradient, and then modify the function, you need to call ``Zygote.refresh()`` or else the gradient will be out of sync. This may not apply for Julia 1.3+.
- It provides no features for getting Jacobians, so you would have to ask for each row of the Jacobian separately. That said, you
probably want to use ``ForwardDiff.jl`` for Jacobians if the dimension of the output is similar to the dimension of the input.
- If you use ``gradient(f, x)`` for some ``f``, then change the function ``f`` and rerun ``gradient(f, x)``, it may not update
- You cannot, in the current release, use mutating functions (e.g. modify a value in an array/etc.) although that feature is in progress
- Compiling can be very slow for complicated functions.

Expand Down Expand Up @@ -688,4 +688,4 @@ With that, we can seed a dual number and find simple derivatives,
For this assignment:

1. Add in AD rules for the other operations: ``*, -, ^, exp``.
2. Come up with some examples of univariate and multivariate functions combining those operations and use your AD implementation to find the derivatives.
2. Come up with some examples of univariate and multivariate functions combining those operations and use your AD implementation to find the derivatives.

0 comments on commit aa925a4

Please sign in to comment.