deprecate :stop from optimizers; housekeeping
This commit is contained in:
parent
a7ad620f01
commit
2f1a9847fa
@ -23,7 +23,6 @@ using .Optimise: @epochs
|
|||||||
export SGD, ADAM, ADAMW, AdaMax, Momentum, Nesterov,
|
export SGD, ADAM, ADAMW, AdaMax, Momentum, Nesterov,
|
||||||
RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM
|
RMSProp, ADAGrad, ADADelta, AMSGrad, NADAM
|
||||||
|
|
||||||
|
|
||||||
include("utils.jl")
|
include("utils.jl")
|
||||||
include("onehot.jl")
|
include("onehot.jl")
|
||||||
include("treelike.jl")
|
include("treelike.jl")
|
||||||
@ -38,5 +37,4 @@ include("data/Data.jl")
|
|||||||
|
|
||||||
@init @require CuArrays="3a865a2d-5b23-5a0f-bc46-62713ec82fae" include("cuda/cuda.jl")
|
@init @require CuArrays="3a865a2d-5b23-5a0f-bc46-62713ec82fae" include("cuda/cuda.jl")
|
||||||
|
|
||||||
end # module
|
end # module
|
||||||
|
|
@ -20,4 +20,4 @@ using Flux.Tracker: TrackedArray
|
|||||||
Param(x::TrackedArray) = Param(x.data, x.grad)
|
Param(x::TrackedArray) = Param(x.data, x.grad)
|
||||||
# Base.convert(::Type{Param}, x::TrackedArray) = Param(x.data, x.grad)
|
# Base.convert(::Type{Param}, x::TrackedArray) = Param(x.data, x.grad)
|
||||||
|
|
||||||
end
|
end
|
@ -60,6 +60,7 @@ function train!(loss, data, opt; cb = () -> ())
|
|||||||
@interrupts back!(l)
|
@interrupts back!(l)
|
||||||
opt()
|
opt()
|
||||||
cb() == :stop && break
|
cb() == :stop && break
|
||||||
|
@deprecate :stop Flux.stop()
|
||||||
catch ex
|
catch ex
|
||||||
if ex isa StopException
|
if ex isa StopException
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user