Skip to content

Commit

Permalink
Update docs of MnasNet (#1092)
Browse files Browse the repository at this point in the history
This PR updates the docs of MnasNet
  • Loading branch information
ekagra-ranjan authored and fmassa committed Jul 5, 2019
1 parent d762537 commit 6eb1798
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions torchvision/models/mnasnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,31 +152,55 @@ def _load_pretrained(model_name, model, progress):


def mnasnet0_5(pretrained=False, progress=True, **kwargs):
""" MNASNet with depth multiplier of 0.5. """
"""MNASNet with depth multiplier of 0.5 from
`"MnasNet: Platform-Aware Neural Architecture Search for Mobile"
<https://arxiv.org/pdf/1807.11626.pdf>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
model = MNASNet(0.5, **kwargs)
if pretrained:
_load_pretrained("mnasnet0_5", model, progress)
return model


def mnasnet0_75(pretrained=False, progress=True, **kwargs):
""" MNASNet with depth multiplier of 0.75. """
"""MNASNet with depth multiplier of 0.75 from
`"MnasNet: Platform-Aware Neural Architecture Search for Mobile"
<https://arxiv.org/pdf/1807.11626.pdf>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
model = MNASNet(0.75, **kwargs)
if pretrained:
_load_pretrained("mnasnet0_75", model, progress)
return model


def mnasnet1_0(pretrained=False, progress=True, **kwargs):
""" MNASNet with depth multiplier of 1.0. """
"""MNASNet with depth multiplier of 1.0 from
`"MnasNet: Platform-Aware Neural Architecture Search for Mobile"
<https://arxiv.org/pdf/1807.11626.pdf>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
model = MNASNet(1.0, **kwargs)
if pretrained:
_load_pretrained("mnasnet1_0", model, progress)
return model


def mnasnet1_3(pretrained=False, progress=True, **kwargs):
""" MNASNet with depth multiplier of 1.3. """
"""MNASNet with depth multiplier of 1.3 from
`"MnasNet: Platform-Aware Neural Architecture Search for Mobile"
<https://arxiv.org/pdf/1807.11626.pdf>`_.
Args:
pretrained (bool): If True, returns a model pre-trained on ImageNet
progress (bool): If True, displays a progress bar of the download to stderr
"""
model = MNASNet(1.3, **kwargs)
if pretrained:
_load_pretrained("mnasnet1_3", model, progress)
Expand Down

0 comments on commit 6eb1798

Please sign in to comment.