Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coefficient (0.01 / math.pi) without parentheses #5

Open
ANTAGNIST opened this issue Apr 10, 2023 · 2 comments
Open

Coefficient (0.01 / math.pi) without parentheses #5

ANTAGNIST opened this issue Apr 10, 2023 · 2 comments

Comments

@ANTAGNIST
Copy link

class Net:
    ...
    def loss_func(self):
        ...
        loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx)
        ...
        return loss

Here the code of loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx) of coefficient 0.01 / math.pi need to be (0.01 / math.pi) , and the code will be loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, (0.01 / math.pi) * du_dxx).
Then the result will change. It's so amazing.

@jayroxis
Copy link
Owner

I am not aware of that the change of parentheses would result in a change in the result. Did you fix the random seed to test out whether it is due to randomness?

@ANTAGNIST
Copy link
Author

I think it doesn't matter with the random seed cause

  1. As the coefficients decrease, the values start to get out of fit.
  2. I run the code over 3 times in every coefficients change without set torch.manual.seed.
    As a result, it's related to coefficients.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants