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

Redundant calculation of loss during training step #72

Open
jhossbach opened this issue Dec 16, 2022 · 1 comment
Open

Redundant calculation of loss during training step #72

jhossbach opened this issue Dec 16, 2022 · 1 comment

Comments

@jhossbach
Copy link
Collaborator

In this code, value_and_grad has the ability to both compute the loss and it's gradient at the same time. We can use that and remove the unnecessary second calculation of the loss in _compute_metrics.

https://github.com/zincware/ZnRND/blob/36b921aae1580ee4ec64a36219db77e9f3ad27d9/znrnd/models/jax_model.py#L137-L146

@SamTov
Copy link
Member

SamTov commented Mar 5, 2024

@KonstiNik Did you resolve this at some stage during your restructures?

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