Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AstitvaAggarwal committed Oct 4, 2023
1 parent eee560a commit 6960497
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/discretize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ function SciMLBase.symbolic_discretize(pde_system::PDESystem,
end

pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
full_likelihood_function, additional_loss,
datafree_pde_loss_functions,
datafree_bc_loss_functions)
full_likelihood_function, additional_loss,
datafree_pde_loss_functions,
datafree_bc_loss_functions)
else

function full_loss_function(θ, p)
# the aggregation happens on cpu even if the losses are gpu, probably fine since it's only a few of them
pde_losses = [pde_loss_function(θ) for pde_loss_function in pde_loss_functions]
Expand Down Expand Up @@ -719,18 +720,16 @@ function SciMLBase.symbolic_discretize(pde_system::PDESystem,
logvector(pinnrep.logger, adaloss.bc_loss_weights,
"adaptive_loss/bc_loss_weights",
iteration[1])
end
end end

return full_weighted_loss
end

pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
return full_weighted_loss
end
pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
full_loss_function, additional_loss,
datafree_pde_loss_functions,
datafree_bc_loss_functions)
end
end

return pinnrep
end

Expand Down

0 comments on commit 6960497

Please sign in to comment.