Skip to content

Commit 3e7e784

Browse files
AstitvaAggarwalChrisRackauckas
authored andcommitted
minor fixes
1 parent 8ea0cb3 commit 3e7e784

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Diff for: src/discretize.jl

+9-10
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,11 @@ function SciMLBase.symbolic_discretize(pde_system::PDESystem,
645645
end
646646

647647
pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
648-
full_likelihood_function, additional_loss,
649-
datafree_pde_loss_functions,
650-
datafree_bc_loss_functions)
648+
full_likelihood_function, additional_loss,
649+
datafree_pde_loss_functions,
650+
datafree_bc_loss_functions)
651651
else
652+
652653
function full_loss_function(θ, p)
653654
# the aggregation happens on cpu even if the losses are gpu, probably fine since it's only a few of them
654655
pde_losses = [pde_loss_function(θ) for pde_loss_function in pde_loss_functions]
@@ -719,18 +720,16 @@ function SciMLBase.symbolic_discretize(pde_system::PDESystem,
719720
logvector(pinnrep.logger, adaloss.bc_loss_weights,
720721
"adaptive_loss/bc_loss_weights",
721722
iteration[1])
722-
end
723+
end end
723724

724-
return full_weighted_loss
725-
end
726-
727-
pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
725+
return full_weighted_loss
726+
end
727+
728+
pinnrep.loss_functions = PINNLossFunctions(bc_loss_functions, pde_loss_functions,
728729
full_loss_function, additional_loss,
729730
datafree_pde_loss_functions,
730731
datafree_bc_loss_functions)
731-
end
732732
end
733-
734733
return pinnrep
735734
end
736735

0 commit comments

Comments
 (0)