pytorch / pytorch/vision

Possibility to have saved models including their optimizer and scheduler state_dicts

Open
#7,740 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🚀 The feature

In PyTorch, it is possible to save a model along with all the entities involved in training (optimiser, scheduler) etc. Would it be possible to have these for ResNet-18,34 and 50?

Motivation, pitch

I am working with the Brevitas library to quantise models and re-train them (NOT from scratch but using the pre-trained models). However, when re-training from a floating point model, I noticed it's best to have access to optimiser and scheduler state dictionaries. Otherwise the training is sub-optimal.

Alternatives

No response

Additional context

No response

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 by reviewing the ResNet-18, ResNet-34, and ResNet-50 model entry points and how PyTorch checkpoints are currently exposed. Determine the intended format and scope for including optimizer and scheduler state dictionaries, then identify the tests needed to verify saving and restoring those states.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.