Thanks for your awesome work, but I found a few minor bugs in simpleODE.
First, the values x_BC and x_PDE are passed in the wrong places:
def loss(self,x_BC,x_PDE):
...
# train neural network
for i in range(steps):
loss = model.loss(x_PDE,x_BC)# use mean squared error
However, def f_BC is
def f_BC(x):
return torch.sin(x)
rather than
def f_BC(x):
return torch.zeros_like(x)
So this code will still get the correct result when this error occurs.
The code corrected by me has been uploaded as an attachment
simple_ode.txt
, which may explain this bug more clearly.
Thanks for your awesome work, but I found a few minor bugs in simpleODE.
First, the values x_BC and x_PDE are passed in the wrong places:
However, def f_BC is
rather than
So this code will still get the correct result when this error occurs. The code corrected by me has been uploaded as an attachment simple_ode.txt , which may explain this bug more clearly.