Skip to content
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

Adding MobileNetV3 Small pre-trained model #3354

Merged
merged 6 commits into from
Feb 9, 2021

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented Feb 5, 2021

MobileNetV3 Small

The pre-trained model was trained:

python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py\
--model mobilenet_v3_small --epochs 600 --opt rmsprop --batch-size 128 --lr 0.064\ 
--wd 0.00001 --lr-step-size 2 --lr-gamma 0.973 --auto-augment imagenet --random-erase 0.2

Submitted batch job 35753749

Then we took the 3 last checkpoints (epochs 549, 528, 408) that improved the Acc@1 and averaged their parameters using the following script:

# Using the store_model_weights method from b4e56df

def avg(epochs, filename):
    paths = ["model_{}.pth".format(i) for i in epochs]
    weights = average_checkpoints(paths)
    torch.save(weights, filename.format(len(epochs)))

avg([563, 555, 554], "model_best{}avg.pth")

Validated with:

python -m torch.distributed.launch --nproc_per_node=8 --use_env train.py\
 --model mobilenet_v3_small --test-only --pretrained

Submitted batch job 35803060

Accuracy metrics:
Acc@1 67.668 Acc@5 87.402

Speed Benchmark: 0.0165 sec per image on CPU

@datumbox datumbox mentioned this pull request Feb 5, 2021
13 tasks
@datumbox datumbox changed the title [WIP] Adding MobileNetV3 Small pre-trained models Adding MobileNetV3 Small pre-trained model Feb 9, 2021
@datumbox datumbox requested a review from fmassa February 9, 2021 10:47
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@datumbox datumbox merged commit 97885cb into pytorch:master Feb 9, 2021
@datumbox datumbox deleted the mobilenetv3_small branch February 9, 2021 11:08
facebook-github-bot pushed a commit that referenced this pull request Feb 10, 2021
Summary:
* Adding TODO placeholders.

* More placeholders.

* Add MobileNetV3 small pre-trained weights.

* Remove placeholders.

Reviewed By: fmassa

Differential Revision: D26341414

fbshipit-source-id: ae7c5e25410be63317889f8d5bae40b35afd994d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants