Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillZubov committed Mar 19, 2024
1 parent c163e28 commit b52c4c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/PINO_ode_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ end
fno = FourierNeuralOperator(ch = (2, 16, 16, 16, 16, 16, 32, 1), modes = (16,), σ = gelu)
opt = OptimizationOptimisers.Adam(0.001)
alg = PINOODE(fno, opt, train_set)
pino_solution = solve(prob, alg, verbose = true, maxiters = 200)
pino_solution = solve(prob, alg, verbose = false, maxiters = 200)
predict = pino_solution.predict
ground = u_output_
@test groundpredict atol=1.0
Expand Down
3 changes: 2 additions & 1 deletion test/PINO_ode_tests_gpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const gpud = gpu_device()
ps = Lux.setup(Random.default_rng(), chain)[1] |> ComponentArray |> gpud
opt = OptimizationOptimisers.Adam(0.03)
alg = PINOODE(chain, opt, train_set; init_params = ps)
pino_solution = solve(prob, alg, verbose = false, maxiters = 1000)
pino_solution = solve(prob, alg, verbose = false, maxiters = 2000)
predict = pino_solution.predict |> cpu
ground = u_output_ |> cpu
@test groundpredict atol=1
Expand All @@ -75,6 +75,7 @@ end
p = Float32[1.5, 1.0, 3.0, 1.0]
tspan = (0.0f0, 4.0f0)
dt = 0.01f0
t0, t_end = tspan

instances_size = 100
range_ = range(t0, stop = t_end, length = instances_size)
Expand Down

0 comments on commit b52c4c2

Please sign in to comment.