Skip to content

Commit caf8692

Browse files
authored
Merge pull request #621 from lostella/fix-typos
Fix typos in documentation
2 parents caaa6fa + 6eb8498 commit caf8692

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

docs/make.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ makedocs(;
6868
],
6969
"How to support ChainRules rules as an AD package author" => [
7070
"Usage in AD" => "ad_author/use_in_ad_system.md",
71-
"Suport calling back into ADs" => "ad_author/call_back_into_ad.md",
71+
"Support calling back into ADs" => "ad_author/call_back_into_ad.md",
7272
"Support opting out of rules" => "ad_author/opt_out.md",
7373
],
7474
"The maths" => [

docs/src/design/changing_the_primal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ An interesting scenario here that may be of concern to some:
429429
if Julia changes the algorithm it uses to compute `exp(::Matrix)`, then during an AD primal pass, it will continue to use the old Padé approximation based algorithm.
430430
This may actually happen, as there are many other algorithms that can compute the matrix exponential.
431431
Further, perhaps there might be an improvement to the exact coefficient or cut-offs used by Julia's current Padé approximation.
432-
If Julia made this change it wopuld not be considered breaking.
432+
If Julia made this change it would not be considered breaking.
433433
[Exact floating point numerical values are not generally considered part of the SemVer-bound API](http://colprac.sciml.ai/#changes-that-are-not-considered-breaking).
434434
Rather only the general accuracy of the computed value relative to the true mathematical value (e.g. for common scalar operations Julia promises 1 [ULP](https://en.wikipedia.org/wiki/Unit_in_the_last_place)).
435435

docs/src/design/many_tangents.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Semantically we can handle these very easily in julia.
163163
Just put in a few more dispatching on `+`.
164164
Multiple-dispatch is great like that.
165165
The down-side is our type-inference becomes hard.
166-
If you have exactly 1 tangent type for each primal type, you can very easily workout what all the types on your reverse pass will be - you don't really need type inference - but you lose so much expressibility.
166+
If you have exactly 1 tangent type for each primal type, you can very easily work out what all the types on your reverse pass will be - you don't really need type inference - but you lose so much expressiveness.
167167

168168
## Appendix: What Swift does
169169

docs/src/maths/nondiff_points.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Here we have no real choice but to say the derivative at `0` is `Inf`.
112112
We could consider as an alternative saying some large but finite value.
113113
However, if too large it will just overflow rapidly anyway; and if too small it will not dominate over finite terms.
114114
It is not possible to find a given value that is always large enough.
115-
Our alternatives woud be to consider the derivative at `nextfloat(0.0)` or `prevfloat(0.0)`.
115+
Our alternatives would be to consider the derivative at `nextfloat(0.0)` or `prevfloat(0.0)`.
116116
But this is more or less the same as choosing some large value -- in this case an extremely large value that will rapidly overflow.
117117

118118

docs/src/rule_author/converting_zygoterules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ChainRules as a philosophy avoids magic as much as possible, and thus require yo
4747
If it is a plain function (like `typeof(sin)`), then the tangent will be [`NoTangent`](@ref).
4848

4949

50-
[^1]: unless you write it in functor form (i.e. `@adjoint (f::MyType)(args...)=...`), in that case like for `rrule` you need to include it explictly.
50+
[^1]: unless you write it in functor form (i.e. `@adjoint (f::MyType)(args...)=...`), in that case like for `rrule` you need to include it explicitly.
5151

5252
## Tangent Type changes
5353
ChainRules uses tangent types that must represent vector spaces (i.e. tangent spaces).

docs/src/rule_author/example.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The tangent of the field `c` is `ZeroTangent()`, because `c` can be perturbed bu
9191
```
9292
The tangent of `b` is `foo.A' * ȳ`, but we have wrapped it into a `Thunk`, a tangent type that represents delayed computation.
9393
The idea is that in case the tangent is not used anywhere, the computation never happens.
94-
Use [`InplaceableThunk`](@ref) if you are interested in [accumulating gradients inplace](@ref grad_acc).
94+
Use [`InplaceableThunk`](@ref) if you are interested in [accumulating gradients in-place](@ref grad_acc).
9595
Note that in practice one would also `@thunk` the `f̄oo.A` tangent, but it was omitted in this example for clarity.
9696

9797
As a final note, since `b` is an `AbstractArray`, its tangent `` should be projected to the right subspace.

docs/src/rule_author/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ However:
1212
- If you are writing rules with abstractly typed arguments, read about [`ProjectTo`](@ref projectto).
1313
- If you want to opt out of using the abstractly typed rule for certain argument types, read about [`@opt_out`](@ref opt_out).
1414
- If you are writing rules for higher order functions, read about [calling back into AD](@ref config).
15-
- If you want to accumulate gradients inplace to avoid extra allocations, read about [gradient accumulation](@ref grad_acc).
15+
- If you want to accumulate gradients in-place to avoid extra allocations, read about [gradient accumulation](@ref grad_acc).

docs/src/rule_author/superpowers/opt_out.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Thus the sum is always going to be zero.
3232
As such the author of that matrix type would probably have overloaded `sum(x::SkewSymmetric{T}) where T = zero(T)`.
3333
ADing this would result in the tangent computed for `x` as `ZeroTangent()` and it would be very fast since AD can see that `x` is never used in the right-hand side.
3434
In contrast the generic method for `AbstractArray` defined above would have to allocate the fill array, and then compute the skew projection.
35-
Only to findout the output would be projected to `SkewSymmetric(zeros(T))` anyway (slower, and a less useful type).
35+
Only to find out the output would be projected to `SkewSymmetric(zeros(T))` anyway (slower, and a less useful type).
3636

3737
To opt-out of using the generic `rrule` and to allow the AD system to do its own thing we use the
3838
[`@opt_out`](@ref) macro, to say to not use it for sum of `SkewSymmetric`.
@@ -41,7 +41,7 @@ To opt-out of using the generic `rrule` and to allow the AD system to do its own
4141
@opt_out rrule(::typeof(sum), ::SkewSymmetric)
4242
```
4343

44-
Perhaps we might not want to ever use rules for SkewSymmetric, because we have determined that it is always better to leave it to the AD, unless a verys specific rule has been written[^1].
44+
Perhaps we might not want to ever use rules for SkewSymmetric, because we have determined that it is always better to leave it to the AD, unless a very specific rule has been written[^1].
4545
We could then opt-out for all 1 arg functions.
4646
```@julia
4747
@opt_out rrule(::Any, ::SkewSymmetric)

docs/src/rule_author/which_functions_need_rules.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ julia> @btime gradient(mse, $y, $ŷ)
147147
143.697 ns (2 allocations: 672 bytes)
148148
```
149149

150-
#### Inplace accumulation
150+
#### In-place accumulation
151151

152-
Inplace accumulation of gradients is slow in `Zygote`.
153-
The issue, demonstrated in the folowing example, is that the gradient of `getindex` allocates an array of zeros with a single non-zero element.
152+
In-place accumulation of gradients is slow in `Zygote`.
153+
The issue, demonstrated in the following example, is that the gradient of `getindex` allocates an array of zeros with a single non-zero element.
154154
```julia
155155
function sum3(array)
156156
x = array[1]

0 commit comments

Comments
 (0)