FluxML / FluxML/OneHotArrays.jl
`onehotbatch(::CuArray, ...)` moves data to host
Open
- Dominant language
- Julia
- Stars
- 19
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The lack of https://github.com/FluxML/Flux.jl/pull/1959 causes the following error, currently blocking https://github.com/FluxML/Flux.jl/pull/2025 :
```julia
julia> using CUDA, OneHotArrays, NNlibCUDA
julia> CUDA.allowscalar(false)
julia> x = [1, 3, 2];
julia> y = onehotbatch(x, (0,1,2,3))
4×3 OneHotMatrix(::Vector{UInt32}) with eltype Bool:
⋅ ⋅ ⋅
1 ⋅ ⋅
⋅ ⋅ 1
⋅ 1 ⋅
julia> y2 = onehotbatch(x |> cu, (0,1,2,3))
ERROR: Scalar indexing is disallowed.
```
Edit: after #27, `onehotbatch(x |> cu, 0:3)` works, but other ways to specify the labels do not.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.