Skip to content

Commit dfcb468

Browse files
cleanup
1 parent ebdb73b commit dfcb468

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/neural_ode.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ using Flux: onehotbatch, onecold
44
using Flux.Losses: logitcrossentropy
55
using Statistics: mean
66
using MLDatasets: Cora
7+
using CUDA
8+
# CUDA.allowscalar(false) # Some scalar indexing is still done by DiffEqFlux
79

810
# device = cpu # `gpu` not working yet
9-
device = gpu
11+
device = CUDA.functional() ? gpu : cpu
1012

1113
# LOAD DATA
1214
data = Cora.dataset()

0 commit comments

Comments
 (0)