added function to stop training
This commit is contained in:
parent
24a3bce495
commit
8ad72e51ea
@ -24,6 +24,7 @@ export SGD, ADAM, ADAMW, AdaMax, Momentum, Nesterov,
|
|||||||
RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM
|
RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM
|
||||||
|
|
||||||
include("utils.jl")
|
include("utils.jl")
|
||||||
|
# export stop
|
||||||
include("onehot.jl")
|
include("onehot.jl")
|
||||||
include("treelike.jl")
|
include("treelike.jl")
|
||||||
|
|
||||||
|
@ -153,3 +153,9 @@ function jacobian(m,x)
|
|||||||
end
|
end
|
||||||
J'
|
J'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
struct StopException <: Exception end
|
||||||
|
|
||||||
|
function stop()
|
||||||
|
throw(StopException)
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user