Compare commits

...

3 Commits
master ... docs

Author SHA1 Message Date
bors[bot] d6c53c13db
Merge #1113
1113: Explicitly import `Flux.Optimiser.apply!` in optimiser docs r=dhairyagandhi96 a=SebastianCallh

Closes #1111 

Co-authored-by: Sebastian Callh <sebastian.callh@peltarion.com>
Co-authored-by: Sebastian Callh <sebastian.callh@gmail.com>
2020-04-08 08:14:17 +00:00
Sebastian Callh 7b55bf40a3
Update docs/src/training/optimisers.md
Co-Authored-By: Dhairya Gandhi <dhairya@juliacomputing.com>
2020-04-08 10:11:35 +02:00
Sebastian Callh 58bb72625c Explicitly import `Flux.Optimiser.apply!` in optimiser docs 2020-04-08 07:53:28 +02:00
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ Momentum(eta::Real, rho::Real) = Momentum(eta, rho, IdDict())
The `Momentum` type will act as our optimiser in this case. Notice that we have added all the parameters as fields, along with the velocity which we will use as our state dictionary. Each parameter in our models will get an entry in there. We can now define the rule applied when this optimiser is invoked.
```julia
function apply!(o::Momentum, x, Δ)
function Flux.Optimise.apply!(o::Momentum, x, Δ)
η, ρ = o.eta, o.rho
v = get!(o.velocity, x, zero(x))::typeof(x)
@. v = ρ * v - η * Δ