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

Implement evaluation mode for model evaluations #705

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

FelixLehn
Copy link
Contributor

Summary

In PART 1 of the tutorial, the classification and regression models use the model.train() setting but not the model.eval() setting with torch.no_grad().

Details and comments

The model.eval() setting with torch.no_grad() is used in PART 2, which makes sense as no test data is used in PART 1, but for the overall understanding and the PyTorch alignment, shouldn't it be there, too?

@coveralls
Copy link

coveralls commented Oct 31, 2023

Pull Request Test Coverage Report for Build 6709715079

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.689%

Totals Coverage Status
Change from base Build 6709565901: 0.0%
Covered Lines: 1851
Relevant Lines: 1997

💛 - Coveralls

Copy link
Collaborator

@adekusar-drl adekusar-drl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. Looks good apart one minor comment.

docs/tutorials/05_torch_connector.ipynb Outdated Show resolved Hide resolved
Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>
@FelixLehn
Copy link
Contributor Author

You're right. It is otherwise explained twice.

Copy link
Collaborator

@adekusar-drl adekusar-drl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@adekusar-drl adekusar-drl merged commit 85687d6 into qiskit-community:main Oct 31, 2023
13 checks passed
oscar-wallis pushed a commit that referenced this pull request Feb 16, 2024
* Code Update 05_torch_connector.ipynb

* Typo 05_torch_connector.ipynb

* Update docs/tutorials/05_torch_connector.ipynb

Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>

---------

Co-authored-by: Anton Dekusar <62334182+adekusar-drl@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants