From 56fafa695151fcac2127c96493885b2b2c81a63c Mon Sep 17 00:00:00 2001 From: Moelf Date: Fri, 9 Oct 2020 10:50:47 -0400 Subject: [PATCH] more test --- test/optimise.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/optimise.jl b/test/optimise.jl index e868d6a927..4d90ec8e94 100644 --- a/test/optimise.jl +++ b/test/optimise.jl @@ -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),