Skip to content

Commit ca5b565

Browse files
committed
Fixing location of _docs
1 parent e622cac commit ca5b565

File tree

6 files changed

+27
-39
lines changed

6 files changed

+27
-39
lines changed

torchvision/models/alexnet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ class AlexNet_Weights(WeightsEnum):
6464
"metrics": {
6565
"acc@1": 56.522,
6666
"acc@5": 79.066,
67-
"_docs": """
68-
These weights reproduce closely the results of the paper using a simplified training recipe.
69-
""",
7067
},
68+
"_docs": """
69+
These weights reproduce closely the results of the paper using a simplified training recipe.
70+
""",
7171
},
7272
)
7373
DEFAULT = IMAGENET1K_V1

torchvision/models/convnext.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def _convnext(
207207
"min_size": (32, 32),
208208
"categories": _IMAGENET_CATEGORIES,
209209
"recipe": "https://github.com/pytorch/vision/tree/main/references/classification#convnext",
210+
"_docs": """
211+
These weights improve upon the results of the original paper by using an enhanced training recipe.
212+
""",
210213
}
211214

212215

@@ -220,9 +223,6 @@ class ConvNeXt_Tiny_Weights(WeightsEnum):
220223
"metrics": {
221224
"acc@1": 82.520,
222225
"acc@5": 96.146,
223-
"_docs": """
224-
These weights improve upon the results of the original paper by using an enhanced training recipe.
225-
""",
226226
},
227227
},
228228
)
@@ -239,9 +239,6 @@ class ConvNeXt_Small_Weights(WeightsEnum):
239239
"metrics": {
240240
"acc@1": 83.616,
241241
"acc@5": 96.650,
242-
"_docs": """
243-
These weights improve upon the results of the original paper by using an enhanced training recipe.
244-
""",
245242
},
246243
},
247244
)
@@ -258,9 +255,6 @@ class ConvNeXt_Base_Weights(WeightsEnum):
258255
"metrics": {
259256
"acc@1": 84.062,
260257
"acc@5": 96.870,
261-
"_docs": """
262-
These weights improve upon the results of the original paper by using an enhanced training recipe.
263-
""",
264258
},
265259
},
266260
)
@@ -277,9 +271,6 @@ class ConvNeXt_Large_Weights(WeightsEnum):
277271
"metrics": {
278272
"acc@1": 84.414,
279273
"acc@5": 96.976,
280-
"_docs": """
281-
These weights improve upon the results of the original paper by using an enhanced training recipe.
282-
""",
283274
},
284275
},
285276
)

torchvision/models/densenet.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ def _densenet(
261261
"min_size": (29, 29),
262262
"categories": _IMAGENET_CATEGORIES,
263263
"recipe": "https://github.com/pytorch/vision/pull/116",
264+
"_docs": """These weights are ported from LuaTorch.""",
264265
}
265266

266267

@@ -274,7 +275,6 @@ class DenseNet121_Weights(WeightsEnum):
274275
"metrics": {
275276
"acc@1": 74.434,
276277
"acc@5": 91.972,
277-
"_docs": """These weights are ported from LuaTorch.""",
278278
},
279279
},
280280
)
@@ -291,7 +291,6 @@ class DenseNet161_Weights(WeightsEnum):
291291
"metrics": {
292292
"acc@1": 77.138,
293293
"acc@5": 93.560,
294-
"_docs": """These weights are ported from LuaTorch.""",
295294
},
296295
},
297296
)
@@ -308,7 +307,6 @@ class DenseNet169_Weights(WeightsEnum):
308307
"metrics": {
309308
"acc@1": 75.600,
310309
"acc@5": 92.806,
311-
"_docs": """These weights are ported from LuaTorch.""",
312310
},
313311
},
314312
)
@@ -325,7 +323,6 @@ class DenseNet201_Weights(WeightsEnum):
325323
"metrics": {
326324
"acc@1": 76.896,
327325
"acc@5": 93.370,
328-
"_docs": """These weights are ported from LuaTorch.""",
329326
},
330327
},
331328
)

torchvision/models/efficientnet.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ class EfficientNet_B0_Weights(WeightsEnum):
461461
"metrics": {
462462
"acc@1": 77.692,
463463
"acc@5": 93.532,
464-
"_docs": """These weights are ported from the original paper.""",
465464
},
465+
"_docs": """These weights are ported from the original paper.""",
466466
},
467467
)
468468
DEFAULT = IMAGENET1K_V1
@@ -481,8 +481,8 @@ class EfficientNet_B1_Weights(WeightsEnum):
481481
"metrics": {
482482
"acc@1": 78.642,
483483
"acc@5": 94.186,
484-
"_docs": """These weights are ported from the original paper.""",
485484
},
485+
"_docs": """These weights are ported from the original paper.""",
486486
},
487487
)
488488
IMAGENET1K_V2 = Weights(
@@ -497,10 +497,10 @@ class EfficientNet_B1_Weights(WeightsEnum):
497497
"metrics": {
498498
"acc@1": 79.838,
499499
"acc@5": 94.934,
500-
"_docs": """
501-
These weights improve upon the results of the original paper by using an enhanced training recipe.
502-
""",
503500
},
501+
"_docs": """
502+
These weights improve upon the results of the original paper by using an enhanced training recipe.
503+
""",
504504
},
505505
)
506506
DEFAULT = IMAGENET1K_V2
@@ -519,8 +519,8 @@ class EfficientNet_B2_Weights(WeightsEnum):
519519
"metrics": {
520520
"acc@1": 80.608,
521521
"acc@5": 95.310,
522-
"_docs": """These weights are ported from the original paper.""",
523522
},
523+
"_docs": """These weights are ported from the original paper.""",
524524
},
525525
)
526526
DEFAULT = IMAGENET1K_V1
@@ -539,8 +539,8 @@ class EfficientNet_B3_Weights(WeightsEnum):
539539
"metrics": {
540540
"acc@1": 82.008,
541541
"acc@5": 96.054,
542-
"_docs": """These weights are ported from the original paper.""",
543542
},
543+
"_docs": """These weights are ported from the original paper.""",
544544
},
545545
)
546546
DEFAULT = IMAGENET1K_V1
@@ -559,8 +559,8 @@ class EfficientNet_B4_Weights(WeightsEnum):
559559
"metrics": {
560560
"acc@1": 83.384,
561561
"acc@5": 96.594,
562-
"_docs": """These weights are ported from the original paper.""",
563562
},
563+
"_docs": """These weights are ported from the original paper.""",
564564
},
565565
)
566566
DEFAULT = IMAGENET1K_V1
@@ -579,8 +579,8 @@ class EfficientNet_B5_Weights(WeightsEnum):
579579
"metrics": {
580580
"acc@1": 83.444,
581581
"acc@5": 96.628,
582-
"_docs": """These weights are ported from the original paper.""",
583582
},
583+
"_docs": """These weights are ported from the original paper.""",
584584
},
585585
)
586586
DEFAULT = IMAGENET1K_V1
@@ -599,8 +599,8 @@ class EfficientNet_B6_Weights(WeightsEnum):
599599
"metrics": {
600600
"acc@1": 84.008,
601601
"acc@5": 96.916,
602-
"_docs": """These weights are ported from the original paper.""",
603602
},
603+
"_docs": """These weights are ported from the original paper.""",
604604
},
605605
)
606606
DEFAULT = IMAGENET1K_V1
@@ -619,8 +619,8 @@ class EfficientNet_B7_Weights(WeightsEnum):
619619
"metrics": {
620620
"acc@1": 84.122,
621621
"acc@5": 96.908,
622-
"_docs": """These weights are ported from the original paper.""",
623622
},
623+
"_docs": """These weights are ported from the original paper.""",
624624
},
625625
)
626626
DEFAULT = IMAGENET1K_V1
@@ -641,10 +641,10 @@ class EfficientNet_V2_S_Weights(WeightsEnum):
641641
"metrics": {
642642
"acc@1": 84.228,
643643
"acc@5": 96.878,
644-
"_docs": """
645-
These weights improve upon the results of the original paper by using an enhanced training recipe.
646-
""",
647644
},
645+
"_docs": """
646+
These weights improve upon the results of the original paper by using an enhanced training recipe.
647+
""",
648648
},
649649
)
650650
DEFAULT = IMAGENET1K_V1
@@ -665,10 +665,10 @@ class EfficientNet_V2_M_Weights(WeightsEnum):
665665
"metrics": {
666666
"acc@1": 85.112,
667667
"acc@5": 97.156,
668-
"_docs": """
669-
These weights improve upon the results of the original paper by using an enhanced training recipe.
670-
""",
671668
},
669+
"_docs": """
670+
These weights improve upon the results of the original paper by using an enhanced training recipe.
671+
""",
672672
},
673673
)
674674
DEFAULT = IMAGENET1K_V1
@@ -692,8 +692,8 @@ class EfficientNet_V2_L_Weights(WeightsEnum):
692692
"metrics": {
693693
"acc@1": 85.808,
694694
"acc@5": 97.788,
695-
"_docs": """These weights are ported from the original paper.""",
696695
},
696+
"_docs": """These weights are ported from the original paper.""",
697697
},
698698
)
699699
DEFAULT = IMAGENET1K_V1

torchvision/models/googlenet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ class GoogLeNet_Weights(WeightsEnum):
287287
"metrics": {
288288
"acc@1": 69.778,
289289
"acc@5": 89.530,
290-
"_docs": """These weights are ported from the original paper.""",
291290
},
291+
"_docs": """These weights are ported from the original paper.""",
292292
},
293293
)
294294
DEFAULT = IMAGENET1K_V1

torchvision/models/inception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ class Inception_V3_Weights(WeightsEnum):
419419
"metrics": {
420420
"acc@1": 77.294,
421421
"acc@5": 93.450,
422-
"_docs": """These weights are ported from the original paper.""",
423422
},
423+
"_docs": """These weights are ported from the original paper.""",
424424
},
425425
)
426426
DEFAULT = IMAGENET1K_V1

0 commit comments

Comments
 (0)