rm more deprecations
This commit is contained in:
parent
2bb0c1e1fe
commit
c70276ddfe
@ -49,8 +49,3 @@ function normalise(x::AbstractArray; dims=1)
|
|||||||
σ′ = std(x, dims = dims, mean = μ′, corrected=false)
|
σ′ = std(x, dims = dims, mean = μ′, corrected=false)
|
||||||
return (x .- μ′) ./ σ′
|
return (x .- μ′) ./ σ′
|
||||||
end
|
end
|
||||||
|
|
||||||
function normalise(x::AbstractArray, dims)
|
|
||||||
Base.depwarn("`normalise(x::AbstractArray, dims)` is deprecated, use `normalise(a, dims=dims)` instead.", :normalise)
|
|
||||||
normalise(x, dims = dims)
|
|
||||||
end
|
|
||||||
|
@ -124,11 +124,6 @@ onecold(y::AbstractMatrix, labels...) =
|
|||||||
onecold(y::OneHotMatrix, labels...) =
|
onecold(y::OneHotMatrix, labels...) =
|
||||||
mapreduce(x -> Flux.onecold(x, labels...), |, y.data, dims = 2, init = 0)
|
mapreduce(x -> Flux.onecold(x, labels...), |, y.data, dims = 2, init = 0)
|
||||||
|
|
||||||
function argmax(xs...)
|
|
||||||
Base.depwarn("`argmax(...)` is deprecated, use `onecold(...)` instead.", :argmax)
|
|
||||||
return onecold(xs...)
|
|
||||||
end
|
|
||||||
|
|
||||||
# TODO probably still want this as a custom adjoint Zygote
|
# TODO probably still want this as a custom adjoint Zygote
|
||||||
# onecold(x::TrackedVector, l...) = onecold(data(x), l...)
|
# onecold(x::TrackedVector, l...) = onecold(data(x), l...)
|
||||||
# onecold(x::TrackedMatrix, l...) = onecold(data(x), l...)
|
# onecold(x::TrackedMatrix, l...) = onecold(data(x), l...)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using Juno
|
using Juno
|
||||||
import Zygote: Params, gradient
|
import Zygote: Params, gradient
|
||||||
import Base.depwarn
|
|
||||||
|
|
||||||
function update!(opt, x, x̄)
|
function update!(opt, x, x̄)
|
||||||
update!(x, -apply!(opt, x, x̄))
|
update!(x, -apply!(opt, x, x̄))
|
||||||
@ -63,10 +62,6 @@ function train!(loss, ps, data, opt; cb = () -> ())
|
|||||||
loss(d...)
|
loss(d...)
|
||||||
end
|
end
|
||||||
update!(opt, ps, gs)
|
update!(opt, ps, gs)
|
||||||
if cb() == :stop
|
|
||||||
depwarn("Use of `:stop` is deprecated; use `Flux.stop()` instead", :stop)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
catch ex
|
catch ex
|
||||||
if ex isa StopException
|
if ex isa StopException
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user