Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry-Jzy committed Dec 23, 2024
1 parent a9a9932 commit fa6e368
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepxde/data/pde_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def forward_call(trunk_input):
# Each error has the shape (N1, ~N2)
for error in error_f:
error_i = []
for i in range(error.shape[0]):
for i in range(num_func):
error_i.append(loss_fn(bkd.zeros_like(error[i]), error[i]))
losses.append(bkd.reduce_mean(bkd.stack(error_i, 0)))

Expand All @@ -292,6 +292,7 @@ def forward_call(trunk_input):
out = out[:, None]
for j, bc in enumerate(self.pde.bcs):
beg, end = bcs_start[j], bcs_start[j + 1]
# The same BC points are used for training and testing.
error = bc.error(
self.train_x[1],
inputs[1],
Expand Down

0 comments on commit fa6e368

Please sign in to comment.