Skip to content

Commit 97885cb

Browse files
authored
Adding MobileNetV3 Small pre-trained model (#3354)
* Adding TODO placeholders. * More placeholders. * Add MobileNetV3 small pre-trained weights. * Remove placeholders.
1 parent 06a5858 commit 97885cb

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

docs/source/models.rst

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ These can be constructed by passing ``pretrained=True``:
6464
shufflenet = models.shufflenet_v2_x1_0(pretrained=True)
6565
mobilenet_v2 = models.mobilenet_v2(pretrained=True)
6666
mobilenet_v3_large = models.mobilenet_v3_large(pretrained=True)
67+
mobilenet_v3_small = models.mobilenet_v3_small(pretrained=True)
6768
resnext50_32x4d = models.resnext50_32x4d(pretrained=True)
6869
wide_resnet50_2 = models.wide_resnet50_2(pretrained=True)
6970
mnasnet = models.mnasnet1_0(pretrained=True)
@@ -143,6 +144,7 @@ ShuffleNet V2 x1.0 69.362 88.316
143144
ShuffleNet V2 x0.5 60.552 81.746
144145
MobileNet V2 71.878 90.286
145146
MobileNet V3 Large 74.042 91.340
147+
MobileNet V3 Small 67.668 87.402
146148
ResNeXt-50-32x4d 77.618 93.698
147149
ResNeXt-101-32x8d 79.312 94.526
148150
Wide ResNet-50-2 78.468 94.086

references/classification/README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py\
5454
```
5555

5656

57-
### MobileNetV3 Large
57+
### MobileNetV3 Large & Small
5858
```
5959
python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py\
60-
--model mobilenet_v3_large --epochs 600 --opt rmsprop --batch-size 128 --lr 0.064\
60+
--model $MODEL --epochs 600 --opt rmsprop --batch-size 128 --lr 0.064\
6161
--wd 0.00001 --lr-step-size 2 --lr-gamma 0.973 --auto-augment imagenet --random-erase 0.2
6262
```
6363

64-
Then we averaged the parameters of the last 3 checkpoints that improved the Acc@1. See [#3182](https://github.com/pytorch/vision/pull/3182) for details.
64+
Here `$MODEL` is one of `mobilenet_v3_large` or `mobilenet_v3_small`.
65+
66+
Then we averaged the parameters of the last 3 checkpoints that improved the Acc@1. See [#3182](https://github.com/pytorch/vision/pull/3182)
67+
and [#3354](https://github.com/pytorch/vision/pull/3354) for details.
68+
6569

6670
## Mixed precision training
6771
Automatic Mixed Precision (AMP) training on GPU for Pytorch can be enabled with the [NVIDIA Apex extension](https://github.com/NVIDIA/apex).

torchvision/models/mobilenetv3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
model_urls = {
1616
"mobilenet_v3_large": "https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth",
17-
"mobilenet_v3_small": None,
17+
"mobilenet_v3_small": "https://download.pytorch.org/models/mobilenet_v3_small-047dcff4.pth",
1818
}
1919

2020

0 commit comments

Comments
 (0)