rm some old deprecations
This commit is contained in:
parent
a9064cad14
commit
1cf37ab9eb
@ -8,8 +8,6 @@ function crossentropy(ŷ::AbstractVecOrMat, y::AbstractVecOrMat; weight = 1)
|
|||||||
-sum(y .* log.(ŷ) .* weight) * 1 // size(y, 2)
|
-sum(y .* log.(ŷ) .* weight) * 1 // size(y, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
@deprecate logloss(x, y) crossentropy(x, y)
|
|
||||||
|
|
||||||
function logitcrossentropy(logŷ::AbstractVecOrMat, y::AbstractVecOrMat; weight = 1)
|
function logitcrossentropy(logŷ::AbstractVecOrMat, y::AbstractVecOrMat; weight = 1)
|
||||||
return -sum(y .* logsoftmax(logŷ) .* weight) * 1 // size(y, 2)
|
return -sum(y .* logsoftmax(logŷ) .* weight) * 1 // size(y, 2)
|
||||||
end
|
end
|
||||||
|
@ -14,11 +14,6 @@ function treelike(m::Module, T, fs = fieldnames(T))
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function treelike(T, fs = fieldnames(T))
|
|
||||||
Base.depwarn("`treelike(T)` is deprecated, use `@treelike T`", :treelike)
|
|
||||||
treelike(Base._current_module(), T, fs)
|
|
||||||
end
|
|
||||||
|
|
||||||
macro treelike(T, fs = nothing)
|
macro treelike(T, fs = nothing)
|
||||||
fs == nothing || isexpr(fs, :tuple) || error("@treelike T (a, b)")
|
fs == nothing || isexpr(fs, :tuple) || error("@treelike T (a, b)")
|
||||||
fs = fs == nothing ? [] : [:($(map(QuoteNode, fs.args)...),)]
|
fs = fs == nothing ? [] : [:($(map(QuoteNode, fs.args)...),)]
|
||||||
|
Loading…
Reference in New Issue
Block a user