Skip to content

Commit

Permalink
minor cleanup in burgers example
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikrathore8 committed Nov 25, 2024
1 parent 74ace2c commit c1a6365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/pinn_forward/Burgers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Backend supported: tensorflow.compat.v1, tensorflow, pytorch, paddle"""

import deepxde as dde
import numpy as np

Expand Down Expand Up @@ -38,13 +39,12 @@ def pde(x, y):
model.train(iterations=15000)
model.compile("L-BFGS")
losshistory, train_state = model.train()
dde.saveplot(losshistory, train_state, issave=True, isplot=True)
# """Backend supported: pytorch"""
# # Run NNCG after Adam and L-BFGS
# dde.optimizers.set_NNCG_options(rank=50, mu=1e-1)
# model.compile("NNCG")
# losshistory, train_state = model.train(iterations=1000, display_every=100)
# dde.saveplot(losshistory, train_state, issave=True, isplot=True)
dde.saveplot(losshistory, train_state, issave=True, isplot=True)

X, y_true = gen_testdata()
y_pred = model.predict(X)
Expand Down

0 comments on commit c1a6365

Please sign in to comment.