fix: set example models to eval mode and follow the convention by zewenli98 · Pull Request #3770 · pytorch/TensorRT
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 383
Merged
fix: set example models to eval mode and follow the convention#3770
fix: set example models to eval mode and follow the convention#3770
Conversation
Copy link
Collaborator
zewenli98
commented
Aug 9, 2025
zewenli98
commented
Description
- In some examples, models are not set to eval mode, which was addressed in this PR.
- Follow the convention of the order
.cuda().half().eval()
Fixes # (issue)
Type of change
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- My code follows the style guidelines of this project (You can use the linters)
- I have performed a self-review of my own code
- I have commented my code, particularly in hard-to-understand areas and hacks
- I have made corresponding changes to the documentation
- I have added tests to verify my fix or my feature
- New and existing unit tests pass locally with my changes
- I have added the relevant labels to my PR in so that relevant reviewers are notified
zewenli98
self-assigned this
meta-cla
bot
added
the
cla signed
label
zewenli98
requested review from
cehongwang,
keehyuna,
narendasan and
peri044
and removed request for
peri044
narendasan reviewed Aug 12, 2025
Copy link
Collaborator
narendasan
left a comment
narendasan
left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add with torch.no_grad?
zewenli98
requested a review
from narendasan
zewenli98
deleted the
go_through_examples
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment