Skip to content

Commit

Permalink
fixes #582
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhairya Gandhi committed Feb 3, 2019
1 parent e243950 commit 30aa814
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/onehot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ onecold(y::AbstractVector, labels = 1:length(y)) = labels[Base.argmax(y)]
onecold(y::AbstractMatrix, labels...) =
dropdims(mapslices(y -> onecold(y, labels...), y, dims=1), dims=1)

onecold(y::OneHotMatrix, labels...) = map(x -> onecold(x, labels...), y.data)

function argmax(xs...)
Base.depwarn("`argmax(...)` is deprecated, use `onecold(...)` instead.", :argmax)
return onecold(xs...)
Expand Down

0 comments on commit 30aa814

Please sign in to comment.