You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11,18 +11,18 @@ Julia has more (automatic) differentiation packages than you can count on 2 hand
11
11
12
12
## Loading `AbstractDifferentiation`
13
13
14
-
To load `AbstractDifferentiation`, use:
14
+
To load `AbstractDifferentiation`, it is recommended to use
15
15
```julia
16
-
using AbstractDifferentiation
16
+
import AbstractDifferentiation as AD
17
17
```
18
-
`AbstractDifferentiation` exports a single name `AD`which is just an alias for the `AbstractDifferentiation` module itself. You can use this to access names inside `AbstractDifferentiation` using `AD.<>` instead of typing the long name `AbstractDifferentiation`.
18
+
With the `AD` alias you can access names inside of`AbstractDifferentiation` using `AD.<>` instead of typing the long name `AbstractDifferentiation`.
19
19
20
20
## `AbstractDifferentiation` backends
21
21
22
22
To use `AbstractDifferentiation`, first construct a backend instance `ab::AD.AbstractBackend` using your favorite differentiation package in Julia that supports `AbstractDifferentiation`.
23
23
In particular, you may want to use `AD.ReverseRuleConfigBackend(ruleconfig)` for any [ChainRules.jl](https://github.com/JuliaDiff/ChainRules.jl)-compatible reverse mode differentiation package.
24
24
25
-
The following backends are temporarily made available by `AbstractDifferentiation` as soon as their corresponding package is loaded (thanks to [Requires.jl](https://github.com/JuliaPackaging/Requires.jl)):
25
+
The following backends are temporarily made available by `AbstractDifferentiation` as soon as their corresponding package is loaded (thanks to [weak dependencies](https://pkgdocs.julialang.org/dev/creating-packages/#Weak-dependencies) on Julia ≥ 1.9 and [Requires.jl](https://github.com/JuliaPackaging/Requires.jl) on older Julia versions):
26
26
27
27
-`AD.ForwardDiffBackend()` for [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl)
28
28
-`AD.FiniteDifferencesBackend()` for [FiniteDifferences.jl](https://github.com/JuliaDiff/FiniteDifferences.jl)
@@ -35,7 +35,7 @@ In the long term, these backend objects (and many more) will be defined within t
35
35
Here's an example:
36
36
37
37
```julia
38
-
julia>using AbstractDifferentiation, Zygote
38
+
julia>import AbstractDifferentiation as AD, Zygote
0 commit comments