From 8ad72e51ea17f5bb6dd8a15f838289d15f67b890 Mon Sep 17 00:00:00 2001 From: Dhairya Gandhi Date: Fri, 17 Aug 2018 19:33:51 +0530 Subject: [PATCH] added function to stop training --- src/Flux.jl | 1 + src/utils.jl | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Flux.jl b/src/Flux.jl index 768e851c..f9268829 100644 --- a/src/Flux.jl +++ b/src/Flux.jl @@ -24,6 +24,7 @@ export SGD, ADAM, ADAMW, AdaMax, Momentum, Nesterov, RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM include("utils.jl") +# export stop include("onehot.jl") include("treelike.jl") diff --git a/src/utils.jl b/src/utils.jl index c53f7864..1e119148 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -153,3 +153,9 @@ function jacobian(m,x) end J' end + +struct StopException <: Exception end + +function stop() + throw(StopException) +end \ No newline at end of file