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

Regarding the significance of constants I1,I2,I3 and wres #1

Open
dashp7 opened this issue Apr 26, 2022 · 0 comments
Open

Regarding the significance of constants I1,I2,I3 and wres #1

dashp7 opened this issue Apr 26, 2022 · 0 comments

Comments

@dashp7
Copy link

dashp7 commented Apr 26, 2022

In the file robertson_pinn/robertson_pinn.py, there is a code snippet:

if use_annealing == False:
scaling_fac = 1e-7
I1 = torch.Tensor([1,0,0]).to(device=device) * scaling_fac
I2 = torch.Tensor([0,1e-9,0]).to(device=device) * scaling_fac
I3 = torch.Tensor([0,0,1e5]).to(device=device) * scaling_fac

Moving to :

if use_annealing == False:
loss_res_train = I1 * criterion(dydt_train[:,0] * w_res[0], rhs_train[:,0] * w_res[0]) \
+ I2 * criterion(dydt_train[:,1] * w_res[1], \
rhs_train[:,1] * w_res[1]) + \
I3 * criterion(dydt_train[:,2] * w_res[2], \
rhs_train[:,2] * w_res[2])
loss_res_test = I1 * criterion(dydt_test[:,0] * w_res[0], rhs_test[:,0] * w_res[0]) \
+ I2 * criterion(dydt_test[:,1] * w_res[1], \
rhs_test[:,1] * w_res[1]) + \
I3 * criterion(dydt_test[:,2] * w_res[2], \
rhs_test[:,2] * w_res[2])

It can be seen that two sets of weights have been used, for example, I1 * criterion(dydt_train[:,0] * w_res[0], rhs_train[:,0] * w_res[0]) for the first species. Can you please explain why two separate sets of weights(I and wres) have been used?

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

1 participant