Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Oct 9, 2020
1 parent 7850a88 commit 56fafa6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/optimise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ end

@test i==0 #all skipped

Flux.train!(
() -> (sleep(0.1); i==8 && Flux.skip(); i+=1),
(),
Iterators.repeated((), 10),
Descent()
)

@test i==8 #skip after i hit 8

i = 0
Flux.train!(() -> (sleep(0.1); i += 1; l),
(),
Iterators.repeated((), 100),
Expand Down

0 comments on commit 56fafa6

Please sign in to comment.