jayroxis / PINNs

PyTorch Implementation of Physics-informed Neural Networks
515 stars 128 forks source link

In the function 'loss_func' of 'Net class' of"Burgers.ipynb", do we need to add 'self.adam.zero_grad()' ? #6

Closed kl869994854 closed 1 year ago

kl869994854 commented 1 year ago

In the function 'loss_func' of 'Net class' of"Burgers.ipynb", do we need to add 'self.adam.zero_grad()' ?

jayroxis commented 1 year ago

Yes, you are right. It is actually a bug, I fixed now, thanks a lot for pointing out.