assert no scalar indexing for onecold

This commit is contained in:
Dhairya Gandhi 2019-02-09 22:38:49 +05:30
parent 35cd9761a8
commit 1ada9afe81
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ Flux.back!(sum(l))
end
@testset "onecold gpu" begin
CuArrays.allowscalar(false)
y = Flux.onehotbatch(ones(3), 1:10) |> gpu;
@test Flux.onecold(y) isa CuArray
@test y[3,:] isa CuArray