From 6076847a454027c2599b9e8588df824f734a087e Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Sun, 1 Mar 2020 15:07:12 +0100 Subject: [PATCH] fix a few typos in docstrings --- docs/src/training/optimisers.md | 8 ++++---- src/optimise/optimisers.jl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/training/optimisers.md b/docs/src/training/optimisers.md index 37288b5d..1ee526b3 100644 --- a/docs/src/training/optimisers.md +++ b/docs/src/training/optimisers.md @@ -62,7 +62,7 @@ ADAMW ## Optimiser Interface -Flux's optimsers are built around a `struct` that holds all the optimiser parameters along with a definition of how to apply the update rule associated with it. We do this via the `apply!` function which takes the optimiser as the first argument followed by the parameter and its corresponding gradient. +Flux's optimisers are built around a `struct` that holds all the optimiser parameters along with a definition of how to apply the update rule associated with it. We do this via the `apply!` function which takes the optimiser as the first argument followed by the parameter and its corresponding gradient. In this manner Flux also allows one to create custom optimisers to be used seamlessly. Let's work this with a simple example. @@ -100,15 +100,15 @@ Flux internally calls on this function via the `update!` function. It shares the ## Composing Optimisers -Flux defines a special kind of optimiser called simply as `Optimiser` which takes in a arbitrary optimisers as input. Its behaviour is similar to the usual optimisers, but differs in that it acts by calling the optimisers listed in it sequentially. Each optimiser produces a modified gradient +Flux defines a special kind of optimiser simply called `Optimiser` which takes in arbitrary optimisers as input. Its behaviour is similar to the usual optimisers, but differs in that it acts by calling the optimisers listed in it sequentially. Each optimiser produces a modified gradient that will be fed into the next, and the resultant update will be applied to the parameter as usual. A classic use case is where adding decays is desirable. Flux defines some basic decays including `ExpDecay`, `InvDecay` etc. ```julia opt = Optimiser(ExpDecay(0.001, 0.1, 1000, 1e-4), Descent()) ``` -Here we apply exponential decay to the `Descent` optimser. The defaults of `ExpDecay` say that its learning rate will be decayed every 1000 steps. -It is then applied like any optimser. +Here we apply exponential decay to the `Descent` optimiser. The defaults of `ExpDecay` say that its learning rate will be decayed every 1000 steps. +It is then applied like any optimiser. ```julia w = randn(10, 10) diff --git a/src/optimise/optimisers.jl b/src/optimise/optimisers.jl index cf4496f4..212b876e 100644 --- a/src/optimise/optimisers.jl +++ b/src/optimise/optimisers.jl @@ -77,7 +77,7 @@ Gradient descent with learning rate `η` and Nesterov momentum `ρ`. ## Parameters - Learning Rate (η): Amount by which the gradients are dicsounted berfore updating the weights. Defaults to `0.001`. - - Nesterov Momentum (ρ): Paramters controlling the amount of nesterov momentum to be applied. Defaults to `0.9`. + - Nesterov Momentum (ρ): Parameters controlling the amount of nesterov momentum to be applied. Defaults to `0.9`. ## Examples ```julia @@ -105,7 +105,7 @@ end """ RMSProp(η, ρ) -Implements the RMSProp algortihm. Often a good choice for recurrent networks. Paramters other than learning rate generally don't need tuning. +Implements the RMSProp algortihm. Often a good choice for recurrent networks. Parameters other than learning rate generally don't need tuning. ## Parameters - Learning Rate (η): Defaults to `0.001`.