deprecate :stop from optimizers; housekeeping

This commit is contained in:
Dhairya Gandhi 2018-08-22 21:25:26 +05:30
parent a7ad620f01
commit 2f1a9847fa
3 changed files with 3 additions and 4 deletions

View File

@ -23,7 +23,6 @@ using .Optimise: @epochs
export SGD, ADAM, ADAMW, AdaMax, Momentum, Nesterov,
RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM
include("utils.jl")
include("onehot.jl")
include("treelike.jl")
@ -38,5 +37,4 @@ include("data/Data.jl")
@init @require CuArrays="3a865a2d-5b23-5a0f-bc46-62713ec82fae" include("cuda/cuda.jl")
end # module
end # module

View File

@ -20,4 +20,4 @@ using Flux.Tracker: TrackedArray
Param(x::TrackedArray) = Param(x.data, x.grad)
# Base.convert(::Type{Param}, x::TrackedArray) = Param(x.data, x.grad)
end
end

View File

@ -60,6 +60,7 @@ function train!(loss, data, opt; cb = () -> ())
@interrupts back!(l)
opt()
cb() == :stop && break
@deprecate :stop Flux.stop()
catch ex
if ex isa StopException
break