pytorch / pytorch/vision

View for use inside Sequential

Open
#1,844 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The previous suggestion to have an official View(shape) for use inside nn.Sequential was closed without explanation or sufficient discussion.

https://github.com/pytorch/vision/issues/720

I believe there are good reasons implement this upstream, including:

  • it avoids users implementing their own and making errors
  • being able to see the shapes of tensor inside the nn..Sequential list which defines other shape-sensitive functions is ergonomic coding!

The reason given for not doing this that the developers prefer us to code without using Sequential. This is only a preference. PyTorch should support both styles, and note that beginners and newcomers to coding prefer the simplicity of Sequential.

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 earlier discussion in pytorch/vision#720 and the requested View(shape) behavior for use inside nn.Sequential. Clarify the supported shape semantics and how the module should fit the Sequential style; done means an official View module is available and its behavior is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.