From fa6e3681e61094e30a9311dea266b4f614d12261 Mon Sep 17 00:00:00 2001 From: Jerry-Jzy Date: Mon, 23 Dec 2024 17:40:22 -0500 Subject: [PATCH] add comment --- deepxde/data/pde_operator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deepxde/data/pde_operator.py b/deepxde/data/pde_operator.py index 1bb97181f..db504bf6c 100644 --- a/deepxde/data/pde_operator.py +++ b/deepxde/data/pde_operator.py @@ -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))) @@ -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],