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 shufflenetv2 #36626

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/paddle/tests/test_pretrained_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def infer(self, arch):
def test_models(self):
arches = [
'mobilenet_v1', 'mobilenet_v2', 'resnet18', 'vgg16', 'alexnet',
'resnext50_32x4d'
'resnext50_32x4d', 'inception_v3', 'shufflenetv2_x1_0', 'shufflenetv2_swish'
]
for arch in arches:
self.infer(arch)
Expand Down
21 changes: 21 additions & 0 deletions python/paddle/tests/test_vision_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ def test_resnext152_32x4d(self):
def test_resnext152_64x4d(self):
self.models_infer('resnext152_64x4d')

def test_shufflenetv2_x0_25(self):
self.models_infer('shufflenetv2_x0_25')

def test_shufflenetv2_x0_33(self):
self.models_infer('shufflenetv2_x0_33')

def test_shufflenetv2_x0_5(self):
self.models_infer('shufflenetv2_x0_5')

def test_shufflenetv2_x1_0(self):
self.models_infer('shufflenetv2_x1_0')

def test_shufflenetv2_x1_5(self):
self.models_infer('shufflenetv2_x1_5')

def test_shufflenetv2_x2_0(self):
self.models_infer('shufflenetv2_x2_0')

def test_shufflenetv2_swish(self):
self.models_infer('shufflenetv2_swish')

def test_vgg16_num_classes(self):
vgg16 = models.__dict__['vgg16'](pretrained=False, num_classes=10)

Expand Down
8 changes: 8 additions & 0 deletions python/paddle/vision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
from .models import resnext101_64x4d # noqa: F401
from .models import resnext152_32x4d # noqa: F401
from .models import resnext152_64x4d # noqa: F401
from .models import ShuffleNetV2 # noqa: F401
from .models import shufflenetv2_x0_25 # noqa: F401
from .models import shufflenetv2_x0_33 # noqa: F401
from .models import shufflenetv2_x0_5 # noqa: F401
from .models import shufflenetv2_x1_0 # noqa: F401
from .models import shufflenetv2_x1_5 # noqa: F401
from .models import shufflenetv2_x2_0 # noqa: F401
from .models import shufflenetv2_swish # noqa: F401
from .transforms import BaseTransform # noqa: F401
from .transforms import Compose # noqa: F401
from .transforms import Resize # noqa: F401
Expand Down
17 changes: 16 additions & 1 deletion python/paddle/vision/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@
from .resnext import resnext101_64x4d # noqa: F401
from .resnext import resnext152_32x4d # noqa: F401
from .resnext import resnext152_64x4d # noqa: F401
from .shufflenetv2 import ShuffleNetV2 # noqa: F401
from .shufflenetv2 import shufflenetv2_x0_25 # noqa: F401
from .shufflenetv2 import shufflenetv2_x0_33 # noqa: F401
from .shufflenetv2 import shufflenetv2_x0_5 # noqa: F401
from .shufflenetv2 import shufflenetv2_x1_0 # noqa: F401
from .shufflenetv2 import shufflenetv2_x1_5 # noqa: F401
from .shufflenetv2 import shufflenetv2_x2_0 # noqa: F401
from .shufflenetv2 import shufflenetv2_swish # noqa: F401

__all__ = [ #noqa
'ResNet',
Expand All @@ -63,5 +71,12 @@
'resnext101_32x4d',
'resnext101_64x4d',
'resnext152_32x4d',
'resnext152_64x4d'
'resnext152_64x4d',
'shufflenetv2_x0_25',
'shufflenetv2_x0_33',
'shufflenetv2_x0_5',
'shufflenetv2_x1_0',
'shufflenetv2_x1_5',
'shufflenetv2_x2_0',
'shufflenetv2_swish',
]
Loading