CTUAvastLab / Mill.jl

Build flexible hierarchical multi-instance learning models.
https://ctuavastlab.github.io/Mill.jl/stable/
MIT License
86 stars 8 forks source link

Flux.onecold for MaybeHotMatrix #94

Closed horakka5 closed 2 years ago

horakka5 commented 2 years ago

It would be nice if one can just call

Flux.onecold(maybehotbatch([1, missing],1:2)) # [1, missing]
simonmandlik commented 2 years ago

We have provided this functionality, but you need to use Mill.maybecold, see https://github.com/CTUAvastLab/Mill.jl/blob/f416a6b4eb71fe1fcfb576718c1785f074a07b39/src/special_arrays/special_arrays.jl#L29-L64