Skip to content

Commit 1e88f78

Browse files
committed
Bug fix in loss plot
1 parent f5e2b1c commit 1e88f78

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

deepxde/postprocessing.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ def saveplot(losshistory, train_state, issave=True, isplot=True):
1919

2020

2121
def plot_loss_history(losshistory):
22-
loss_train = np.sum(
23-
np.array(losshistory.loss_train) * losshistory.loss_weights, axis=1
24-
)
25-
loss_test = np.sum(
26-
np.array(losshistory.loss_test) * losshistory.loss_weights, axis=1
27-
)
22+
loss_train = np.sum(losshistory.loss_train, axis=1)
23+
loss_test = np.sum(losshistory.loss_test, axis=1)
2824

2925
plt.figure()
3026
plt.semilogy(losshistory.steps, loss_train, label="Train loss")

0 commit comments

Comments
 (0)