-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Model doc revamp - first PR #5821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6351698
First PR for model doc revamp
NicolasHug 1058c45
Deactivating fail on warning, temporarily
NicolasHug 41969bd
Remove commnet
NicolasHug ad2899a
Minor changes
NicolasHug fb4a494
Merge branch 'main' into doc_revamp_letsgo
NicolasHug ca4b03e
Typos
NicolasHug 3763a88
Added TODO in Makefile
NicolasHug 237ba92
Merge branch 'doc_revamp_letsgo' of github.com:NicolasHug/vision into…
NicolasHug edfcbe0
Keep old models.rst file intact, move new docs into new models_new.rs…
NicolasHug 9211a6d
Merge branch 'main' of github.com:pytorch/vision into doc_revamp_letsgo
NicolasHug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ResNet | ||
====== | ||
|
||
.. currentmodule:: torchvision.models | ||
|
||
The ResNet model is based on the `Deep Residual Learning for Image Recognition | ||
<https://arxiv.org/abs/1512.03385>`_ paper. | ||
|
||
|
||
Model builders | ||
-------------- | ||
|
||
The following model builders can be used to instanciate a ResNet model, with or | ||
without pre-trained weights. All the model builders internally rely on the | ||
``torchvision.models.resnet.ResNet`` base class. Please refer to the `source | ||
code | ||
<https://github.com/pytorch/vision/blob/main/torchvision/models/resnet.py>`_ for | ||
more details about this class. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: function.rst | ||
|
||
resnet18 | ||
resnet34 | ||
resnet50 | ||
resnet101 | ||
resnet152 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
VGG | ||
=== | ||
|
||
.. currentmodule:: torchvision.models | ||
|
||
The VGG model is based on the `Very Deep Convolutional Networks for Large-Scale | ||
Image Recognition <https://arxiv.org/abs/1409.1556>`_ paper. | ||
|
||
|
||
Model builders | ||
-------------- | ||
|
||
The following model builders can be used to instanciate a VGG model, with or | ||
without pre-trained weights. All the model buidlers internally rely on the | ||
``torchvision.models.vgg.VGG`` base class. Please refer to the `source code | ||
<https://github.com/pytorch/vision/blob/main/torchvision/models/vgg.py>`_ for | ||
more details about this class. | ||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: function.rst | ||
|
||
vgg11 | ||
vgg11_bn | ||
vgg13 | ||
vgg13_bn | ||
vgg16 | ||
vgg16_bn | ||
vgg19 | ||
vgg19_bn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. _models_new: | ||
|
||
Models and pre-trained weights - New | ||
#################################### | ||
|
||
.. note:: | ||
|
||
These are the new models docs, documenting the new multi-weight API. | ||
TODO: Once all is done, remove the "- New" part in the title above, and | ||
rename this file as models.rst | ||
|
||
|
||
The ``torchvision.models`` subpackage contains definitions of models for addressing | ||
different tasks, including: image classification, pixelwise semantic | ||
segmentation, object detection, instance segmentation, person | ||
keypoint detection, video classification, and optical flow. | ||
|
||
.. note :: | ||
Backward compatibility is guaranteed for loading a serialized | ||
``state_dict`` to the model created using old PyTorch version. | ||
On the contrary, loading entire saved models or serialized | ||
``ScriptModules`` (seralized using older versions of PyTorch) | ||
may not preserve the historic behaviour. Refer to the following | ||
`documentation | ||
<https://pytorch.org/docs/stable/notes/serialization.html#id6>`_ | ||
|
||
|
||
Classification | ||
============== | ||
|
||
.. currentmodule:: torchvision.models | ||
|
||
The following classification models are available, with or without pre-trained | ||
weights: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
models/resnet | ||
models/vgg | ||
|
||
|
||
Table of all available classification weights | ||
--------------------------------------------- | ||
|
||
Accuracies are reported on ImageNet | ||
|
||
.. include:: generated/classification_table.rst | ||
|
||
|
||
Object Detection, Instance Segmentation and Person Keypoint Detection | ||
===================================================================== | ||
|
||
TODO: Something similar to classification models: list of models + table of weights |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The -W flag will make the docs error on warnings. It's good to have to avoid having broken references. But since I removed almost all of the
models.rst
file, a few of the refs (e.g. from gallery examples) are broken. To avoid noise I'm removing the flag for now.Will definitely put it back once everything is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a TODO or create an issue to avoid forgetting?