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

Add weight for mnasnet0_75 and mnasnet1_3 #6019

Merged
merged 6 commits into from
May 16, 2022

Conversation

YosuaMichael
Copy link
Contributor

@YosuaMichael YosuaMichael commented May 16, 2022

Adding mnasnet0_75 and mnasnet1_3 weights.

Training commands:

# Training mnas0_75
python -u ~/script/run_with_submitit.py \
    --timeout 6000 --ngpus 8 --nodes 1 --batch-size=128 \
    --partition train --model mnasnet0_75 \
    --data-path="/datasets01_ontap/imagenet_full_size/061417" \
    --lr=0.5 --lr-scheduler=cosineannealinglr --lr-warmup-epochs=5 --lr-warmup-method=linear \
    --auto-augment=ta_wide --epochs=600 --random-erase=0.1 --weight-decay=0.00002 \
    --norm-weight-decay=0.0 --label-smoothing=0.1 --mixup-alpha=0.2 --cutmix-alpha=1.0 \
    --train-crop-size=176 --model-ema --val-resize-size=232 --ra-sampler --ra-reps=4

# Training mnas1_3
python -u ~/script/run_with_submitit.py \
    --timeout 6000 --ngpus 8 --nodes 1 --batch-size=128 \
    --partition train --model mnasnet1_3 \
    --data-path="/datasets01_ontap/imagenet_full_size/061417" \
    --lr=0.5 --lr-scheduler=cosineannealinglr --lr-warmup-epochs=5 --lr-warmup-method=linear \
    --auto-augment=ta_wide --epochs=600 --random-erase=0.1 --weight-decay=0.00002 \
    --norm-weight-decay=0.0 --label-smoothing=0.1 --mixup-alpha=0.2 --cutmix-alpha=1.0 \
    --train-crop-size=176 --model-ema --val-resize-size=232 --ra-sampler --ra-reps=4

Validation script:

# validate mnasnet0_75
python -u ~/script/run_with_submitit.py \
    --timeout 3000 --nodes 1 --ngpus 1 --batch-size=1 \
    --partition train --model mnasnet0_75 \
    --data-path="/datasets01_ontap/imagenet_full_size/061417" \
    --weights="MNASNet0_75_Weights.IMAGENET1K_V1" \
    --test-only \
# Acc@1 71.180 Acc@5 90.496

# validate mnasnet1_3
python -u ~/script/run_with_submitit.py \
    --timeout 3000 --nodes 1 --ngpus 1 --batch-size=1 \
    --partition train --model mnasnet1_3 \
    --data-path="/datasets01_ontap/imagenet_full_size/061417" \
    --weights="MNASNet1_3_Weights.IMAGENET1K_V1" \
    --test-only \
# Acc@1 76.506 Acc@5 93.522

@YosuaMichael YosuaMichael changed the title Add weight for mnasnet0_75 and mnasnet1_3 [WIP] Add weight for mnasnet0_75 and mnasnet1_3 May 16, 2022
@YosuaMichael YosuaMichael marked this pull request as draft May 16, 2022 09:38
@YosuaMichael YosuaMichael marked this pull request as ready for review May 16, 2022 10:04
@YosuaMichael YosuaMichael requested a review from datumbox May 16, 2022 10:04
@YosuaMichael YosuaMichael self-assigned this May 16, 2022
@datumbox datumbox changed the title [WIP] Add weight for mnasnet0_75 and mnasnet1_3 Add weight for mnasnet0_75 and mnasnet1_3 May 16, 2022
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

You forgot to change the default values for the weights in handle_legacy_interface. Other than that it looks good.

@datumbox datumbox mentioned this pull request May 16, 2022
24 tasks
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @YosuaMichael!

@YosuaMichael
Copy link
Contributor Author

The failed test seems to not related to this PR, will merge.

@YosuaMichael YosuaMichael merged commit 4176556 into pytorch:main May 16, 2022
facebook-github-bot pushed a commit that referenced this pull request Jun 1, 2022
Summary:
* Add weight for mnasnet0_75 and mnasnet1_3

* Fix missing comma

* Add PR url as recipe, and update the metrics

* Add weights to legacy handler

* Update docs to specify there are weights available

Reviewed By: NicolasHug

Differential Revision: D36760931

fbshipit-source-id: 00211a6dd22b4b42a9845b7b4d25337ed14a6349
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.

4 participants