fix: set example models to eval mode and follow the convention by zewenli98 · Pull Request #3770 · pytorch/TensorRT

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@zewenli98

Copy link

Collaborator

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 zewenli98 self-assigned this

Aug 9, 2025

@meta-cla meta-cla bot added the cla signed label

Aug 9, 2025

@zewenli98 zewenli98 requested review from cehongwang, keehyuna, narendasan and peri044 and removed request for peri044

August 9, 2025 01:06
Copy link

Collaborator

@narendasan 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 zewenli98 requested a review from narendasan

August 13, 2025 02:06

@zewenli98 zewenli98 merged commit 17afde4 into main

Aug 20, 2025

85 of 87 checks passed

@zewenli98 zewenli98 deleted the go_through_examples branch

January 12, 2026 21:11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cehongwang cehongwang Awaiting requested review from cehongwang

@keehyuna keehyuna Awaiting requested review from keehyuna

@peri044 peri044 Awaiting requested review from peri044

@narendasan narendasan Awaiting requested review from narendasan

Assignees

@zewenli98 zewenli98

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@zewenli98 @narendasan