nograd for onecold, onehot, onehotbatch

This commit is contained in:
CarloLucibello 2020-02-06 13:42:17 +01:00
parent 60043fa2aa
commit 6499344af3
1 changed files with 1 additions and 3 deletions

View File

@ -125,6 +125,4 @@ onecold(y::AbstractMatrix, labels...) =
onecold(y::OneHotMatrix, labels...) =
mapreduce(x -> Flux.onecold(x, labels...), |, y.data, dims = 2, init = 0)
# TODO probably still want this as a custom adjoint Zygote
# onecold(x::TrackedVector, l...) = onecold(data(x), l...)
# onecold(x::TrackedMatrix, l...) = onecold(data(x), l...)
@nograd onecold, onehot, onehotbatch