Skip to content

Commit

Permalink
imutable
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillZubov committed Aug 30, 2024
1 parent 7059e37 commit c4092b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/pino_ode_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function PINOODE(chain,
init_params, strategy, additional_loss, kwargs)
end

#TODO imutable?
struct PINOPhi{C, S}
chain::C
st::S
Expand Down
2 changes: 2 additions & 0 deletions test/PINO_ode_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ end
opt = OptimizationOptimisers.Adam(0.03)
#generate data
ground_analytic = (u0, p, t) -> u0 + p * t^3 / 3

function get_data()
sol = ground_analytic.(u0, p, vec(t))
tuple_ = (p, t)
Expand All @@ -105,6 +106,7 @@ end
v = rand(1, 40, 1)
θ, st = Lux.setup(Random.default_rng(), deeponet)
c = deeponet((u, v), θ, st)[1]
p, t = get_trainset(bounds, tspan, number_of_parameters, dt)
data, tuple_ = get_data()
function additional_loss_(phi, θ)
u = phi(tuple_, θ)
Expand Down

0 comments on commit c4092b5

Please sign in to comment.