Skip to content

Commit de0e89c

Browse files
authored
Fixes as per Grammarly
1 parent add9727 commit de0e89c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/utilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Flux.skip
122122

123123
Flux provides utilities for controlling your training procedure according to some monitored condition and a maximum `patience`. For example, you can use `early_stopping` to stop training when the model is converging or deteriorating, or you can use `plateau` to check if the model is stagnating.
124124

125-
For example, below we create a pseudo-loss function that decreases, bottoms out, then increases. The early stopping trigger will break the loop before the loss increases too much.
125+
For example, below we create a pseudo-loss function that decreases, bottoms out, and then increases. The early stopping trigger will break the loop before the loss increases too much.
126126
```julia
127127
# create a pseudo-loss that decreases for 4 calls, then starts increasing
128128
# we call this like loss()
@@ -143,7 +143,7 @@ es = early_stopping(loss, 2; init_score = 9)
143143
end
144144
```
145145

146-
The keyword argument `distance` of `early_stopping` is a function of the form `distance(best_score, score)`. By default `distance` is `-`, which implies that the monitored metric `f` is expected to be decreasing and mimimized. If you use some increasing metric (e.g. accuracy), you can customize the `distance` function: `(best_score, score) -> score - best_score`.
146+
The keyword argument `distance` of `early_stopping` is a function of the form `distance(best_score, score)`. By default `distance` is `-`, which implies that the monitored metric `f` is expected to be decreasing and minimized. If you use some increasing metric (e.g. accuracy), you can customize the `distance` function: `(best_score, score) -> score - best_score`.
147147
```julia
148148
# create a pseudo-accuracy that increases by 0.01 each time from 0 to 1
149149
# we call this like acc()

0 commit comments

Comments
 (0)