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

Making protected params of MobileNetV3 public #3828

Merged
merged 5 commits into from
May 13, 2021

Conversation

datumbox
Copy link
Contributor

@datumbox datumbox commented May 13, 2021

This PR makes the previously protected constructor parameters of MobileNetV3 public.

Back when the model was added (see #3276 (comment)), it was unclear whether any models would use those parameters. Now with segmentation and detection models in place using them, we should properly expose them to the users in case they want to create their own backbones.

Along with unit-tests, I confirmed that all current MobileNetV3 models remain unaffected by running:

cd ./references/detection
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model ssdlite320_mobilenet_v3_large --test-only --pretrained
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model fasterrcnn_mobilenet_v3_large_fpn --test-only --pretrained
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model fasterrcnn_mobilenet_v3_large_320_fpn --test-only --pretrained

cd ./references/segmentation
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model lraspp_mobilenet_v3_large --test-only --pretrained
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model deeplabv3_mobilenet_v3_large --test-only --pretrained

cd ./references/classification
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model mobilenet_v3_large --test-only --pretrained
python -m torch.distributed.launch --nproc_per_node=2 --use_env train.py --model mobilenet_v3_small --test-only --pretrained
python -u train_quantization.py --device='cpu' --model='mobilenet_v3_large' --test-only 

@datumbox datumbox merged commit b94a401 into pytorch:master May 13, 2021
@datumbox datumbox deleted the refactor/mobilenetv3_hidden_params branch May 13, 2021 19:00
facebook-github-bot pushed a commit that referenced this pull request May 19, 2021
Summary:
* Converting private parameters to public.

* Add kwargs to handle extra params.

* Add another kwargs.

* Add arguments in _mobilenet_extractor.

Reviewed By: cpuhrsch

Differential Revision: D28538763

fbshipit-source-id: 5daf108979337360873b02c919a389f7216dacf2
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