Skip to content

Commit

Permalink
Update src/pino_ode_solve.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Sathvik Bhagavan <[email protected]>
  • Loading branch information
KirillZubov and sathvikbhagavan authored Jul 17, 2024
1 parent 09e5555 commit 8ae7b0f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/pino_ode_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ end

function generate_pino_phi_θ(chain::Lux.AbstractExplicitLayer, init_params)
θ, st = Lux.setup(Random.default_rng(), chain)
if init_params === nothing
init_params = ComponentArrays.ComponentArray(θ)
else
init_params = ComponentArrays.ComponentArray(init_params)
end
init_params = isnothing(init_params) ? θ : init_params
init_params = ComponentArrays.ComponentArray(init_params)
PINOPhi(chain, st), init_params
end

Expand Down

0 comments on commit 8ae7b0f

Please sign in to comment.