Skip to content

Remove redundant epoch_number variable in training tutorial (issue 3714)#3787

Open
sheralskumar wants to merge 1 commit intopytorch:mainfrom
sheralskumar:issue/3714
Open

Remove redundant epoch_number variable in training tutorial (issue 3714)#3787
sheralskumar wants to merge 1 commit intopytorch:mainfrom
sheralskumar:issue/3714

Conversation

@sheralskumar
Copy link

Fixes #3714

Description

Removed redundant epoch_number variable and used the loop variable epoch directly for logging and checkpointing. This simplifies the code, improving clarity for beginners.

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 2, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3787

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the cla signed label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feedback about Training with PyTorch

1 participant