Skip to content

Commit ba9d028

Browse files
Merge pull request #144 from SciML/tests
seed tests
2 parents d1c89b2 + 4898252 commit ba9d028

File tree

8 files changed

+22
-1
lines changed

8 files changed

+22
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Flux = "0.10.1, 0.11"
3636
ForwardDiff = "0.10"
3737
GalacticOptim = "0.1.1, 0.2"
3838
ModelingToolkit = "3.11"
39-
Optim = "0.20, 0.21, 0.22, 1.0"
39+
Optim = "1.0"
4040
Reexport = "0.2"
4141
StochasticDiffEq = "6.13"
4242
Tracker = "0.2"

test/NNKolmogorov_tests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ println("Kolmogorov Tests")
33
using DiffEqDevTools , NeuralPDE
44
using Distributions
55

6+
using Random
7+
Random.seed!(100)
68

79
#Using SDEProblem for the Algorithm.
810
# For a diract delta take u0 = Normal(0 , sigma) where sigma --> 0

test/NNPDEHan_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ using Flux, Zygote, LinearAlgebra, Statistics
22
println("NNPDEHAN_tests")
33
using Test, NeuralPDE , StochasticDiffEq
44

5+
using Random
6+
Random.seed!(100)
7+
58
# one-dimensional heat equation
69
x0 = [11.0f0] # initial points
710
tspan = (0.0f0,5.0f0)

test/NNPDENS_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ using LinearAlgebra, Statistics
33
println("NNPDENS_tests")
44
using Test, NeuralPDE
55

6+
using Random
7+
Random.seed!(100)
8+
69
println("one-dimensional heat equation")
710
x0 = Float32[11.] # initial points
811
tspan = (0.0f0,5.0f0)

test/NNPDE_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ using Test, NeuralPDE
88
using GalacticOptim
99
using Optim
1010

11+
using Random
12+
Random.seed!(100)
13+
1114
cb = function (p,l)
1215
println("Current loss is: $l")
1316
return false

test/NNPDE_tests_gpu.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ using GalacticOptim
99
using Optim
1010
using CUDA
1111

12+
using Random
13+
Random.seed!(100)
14+
1215
cb = function (p,l)
1316
println("Current loss is: $l")
1417
return false

test/NNRODE_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ using Flux , StochasticDiffEq, DiffEqNoiseProcess , Optim, Test
33
println("RODE_tests")
44
using NeuralPDE
55

6+
using Random
7+
Random.seed!(100)
8+
69
println("Test Case 1")
710
linear = (u,p,t,W) -> 2u*sin(W)
811
tspan = (0.00f0, 1.00f0)

test/Stopping_tests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
using Test, Flux , StochasticDiffEq , LinearAlgebra
22
println("Optimal Stopping Time Test")
33
using NeuralPDE
4+
5+
using Random
6+
Random.seed!(100)
7+
48
d = 1
59
r = 0.04f0
610
beta = 0.2f0

0 commit comments

Comments
 (0)