Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
3414322d
Unverified
Commit
3414322d
authored
May 12, 2022
by
Nicolas Hug
Committed by
GitHub
May 12, 2022
Browse files
Handle empty weights in doc generation (#6006)
parent
ddb342dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
docs/source/conf.py
docs/source/conf.py
+5
-0
torchvision/models/mnasnet.py
torchvision/models/mnasnet.py
+4
-0
No files found.
docs/source/conf.py
View file @
3414322d
...
...
@@ -316,6 +316,11 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
"""
if
obj
.
__name__
.
endswith
((
"_Weights"
,
"_QuantizedWeights"
)):
if
len
(
obj
)
==
0
:
lines
[:]
=
[
"There are no available pre-trained weights."
]
return
lines
[:]
=
[
"The model builder above accepts the following values as the ``weights`` parameter."
,
f
"``
{
obj
.
__name__
}
.DEFAULT`` is equivalent to ``
{
obj
.
DEFAULT
}
``."
,
...
...
torchvision/models/mnasnet.py
View file @
3414322d
...
...
@@ -316,6 +316,8 @@ def mnasnet0_75(*, weights: Optional[MNASNet0_75_Weights] = None, progress: bool
<https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.MNASNet0_75_Weights
:members:
"""
weights
=
MNASNet0_75_Weights
.
verify
(
weights
)
...
...
@@ -366,6 +368,8 @@ def mnasnet1_3(*, weights: Optional[MNASNet1_3_Weights] = None, progress: bool =
<https://github.com/pytorch/vision/blob/main/torchvision/models/mnasnet.py>`_
for more details about this class.
.. autoclass:: torchvision.models.MNASNet1_3_Weights
:members:
"""
weights
=
MNASNet1_3_Weights
.
verify
(
weights
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment