Skip to content

Commit 532ac4c

Browse files
committed
Fix docs
1 parent b258fb8 commit 532ac4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/demos/pinn_forward/ode.2nd.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ Next, we choose the network. Here, we use a fully connected neural network of de
8787
initializer = "Glorot uniform"
8888
net = dde.nn.FNN(layer_size, activation, initializer)
8989
90-
Now, we have the PDE problem and the network. We build a ``Model``, choose the optimizer, set the learning rate to 0.001, and train the network for 15000 iterations. We set the weight of the first initial condition to 0.01, and the weight of the second initial condition and the PDE residual loss to 1. We also compute the :math:`L^2` relative error as a metric during training.
90+
Now, we have the PDE problem and the network. We build a ``Model``, choose the optimizer, set the learning rate to 0.001, and train the network for 15000 iterations. We set the weight of the ODE loss to 0.01, and the weights of the two ICs to 1. We also compute the :math:`L^2` relative error as a metric during training.
9191

9292
.. code-block:: python
9393
9494
model = dde.Model(data, net)
95-
model.compile("adam", lr=.001, metrics=["l2 relative error"], loss_weights=[0.01,1,1])
95+
model.compile("adam", lr=.001, loss_weights=[0.01, 1, 1], metrics=["l2 relative error"])
9696
losshistory, train_state = model.train(epochs=15000)
9797
9898

0 commit comments

Comments
 (0)