π[BUG]: Validator L2 Relative Error Loss
BoomChawit opened this issue Β· comments
Version
v1.3.0
On which installation method(s) does this occur?
No response
Describe the issue
I would like to report an issue in modulus/sym/domain/validator/validator.py
.
As in lines 39 - 42, the L2 relative error is written as
new_var["l2_relative_error_" + str(key)] = torch.sqrt(
torch.mean(torch.square(true_var[key] - pred_var[key]))
/ torch.var(true_var[key])
)
However, I understand that the L2 relative error is defined as
new_var["l2_relative_error_" + str(key)] = torch.sqrt(
torch.sum(torch.square(true_var[key] - pred_var[key]))
/ torch.sum(torch.square(true_var[key]))
)
Regarding the validation loss, I would like to bring up this concern. If I misunderstand the concept of the function, please correct my understanding. Thank you very much for your consideration.
Minimum reproducible example
No response
Relevant log output
No response
Environment details
No response
Other/Misc.
No response