diff --git a/src/MLP.jl b/src/MLP.jl index f197f45..4bf0d16 100644 --- a/src/MLP.jl +++ b/src/MLP.jl @@ -235,11 +235,11 @@ function _ml_picard_mlt( NUM_THREADS = Threads.nthreads() tasks = [ Threads.@spawn( - _ml_picard_call( - M, L, K, x, s, t, mc_sample!, g, f, verbose, - NUM_THREADS, thread_id, prob, neumann_bc - ) - ) for thread_id in 1:NUM_THREADS + _ml_picard_call( + M, L, K, x, s, t, mc_sample!, g, f, verbose, + NUM_THREADS, thread_id, prob, neumann_bc + ) + ) for thread_id in 1:NUM_THREADS ] # first level diff --git a/test/reflect.jl b/test/reflect.jl index 3afb76b..208382c 100644 --- a/test/reflect.jl +++ b/test/reflect.jl @@ -41,7 +41,7 @@ if CUDA.functional() @testset "testing equivalence cpu gpu" begin batch_size = 1000 a = repeat(X0[:], 1, batch_size) - b = a + 2f0 .* randn(Float32, size(a)) + b = a + 2.0f0 .* randn(Float32, size(a)) a = hcat(X0, a) |> gpu b = hcat(X1, b) |> gpu s = -1.0f0 diff --git a/test/shared/DeepBSDE_Han.jl b/test/shared/DeepBSDE_Han.jl index 1548359..8d74b01 100644 --- a/test/shared/DeepBSDE_Han.jl +++ b/test/shared/DeepBSDE_Han.jl @@ -42,10 +42,10 @@ end # sub-neural network approximating the spatial gradients at time point σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt) @@ -94,10 +94,10 @@ end # sub-neural network approximating the spatial gradients at time point σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt) @@ -145,11 +145,11 @@ end ) σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt) @@ -198,10 +198,10 @@ end # sub-neural network approximating the spatial gradients at time point σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt) @@ -252,11 +252,11 @@ end # sub-neural network approximating the spatial gradients at time point σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt) @@ -339,11 +339,11 @@ end σᵀ∇u = [ Flux.Chain( - Dense(d, hls, relu), - Dense(hls, hls, relu), - Dense(hls, hls, relu), - Dense(hls, d) - ) for i in 1:time_steps + Dense(d, hls, relu), + Dense(hls, hls, relu), + Dense(hls, hls, relu), + Dense(hls, d) + ) for i in 1:time_steps ] alg = DeepBSDE(u0, σᵀ∇u, opt = opt)