Skip to content

Commit

Permalink
add removal notes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed Jul 28, 2022
1 parent ade0bef commit d908f66
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/optimise/train.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ struct SkipException <: Exception end
Call `Flux.skip()` in a callback to indicate when a callback condition is met.
This will trigger the train loop to skip the current data point and not update with the calculated gradient.
!!! note
`Flux.skip()` will be removed from Flux 0.14
# Examples
```julia
cb = function ()
Expand All @@ -61,6 +64,9 @@ struct StopException <: Exception end
Call `Flux.stop()` in a callback to indicate when a callback condition is met.
This will trigger the train loop to stop and exit.
!!! note
`Flux.stop()` will be removed from Flux 0.14. It should be replaced with `break` in an ordinary `for` loop.
# Examples
```julia
cb = function ()
Expand Down Expand Up @@ -145,6 +151,9 @@ end
Run `body` `N` times. Mainly useful for quickly doing multiple epochs of
training in a REPL.
!!! note
The macro `@epochs` will be removed from Flux 0.14. Please just write an ordinary `for` loop.
# Examples
```julia
julia> Flux.@epochs 2 println("hello")
Expand Down

0 comments on commit d908f66

Please sign in to comment.