pytorch / pytorch/tutorials

Potentially 2 LR Schedulers used for Object Detection Tutorial

Open
#2,631 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: vision
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

Link to tutorial: https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html

Hi there, I am following the object detection tutorial and have copied the necessary files from pytorch/vision/main/references/detection/. When inspecting the engine.train_one_epoch() function, I see that it creates a LR scheduler (LinearLR) there and calls lr_scheduler.step() inside train_one_epoch(), however in the tutorial it also creates its own LR scheduler (StepLR) in the main script, and also calls lr_scheduler.step() within the training loop.

Is this meant to be the case or should the tutorial be updated?

cc @datumbox @nairbv @fmassa @NicolasHug @YosuaMichael

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked object detection tutorial and the copied detection reference files, then trace engine.train_one_epoch() alongside the tutorial's training loop. Compare the LinearLR and StepLR creation and step calls, and confirm the intended scheduler behavior with the project context. Done means the tutorial and reference usage are consistent and the scheduler choice is documented clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.