fedlab_core.models.mobilenetv2¶
MobileNetV2 in PyTorch.
See the paper “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” for more details.
Module Contents¶
Classes¶
expand + depthwise + pointwise |
|
Functions¶
|
-
class
fedlab_core.models.mobilenetv2.Block(in_planes, out_planes, expansion, stride)¶ Bases:
torch.nn.Moduleexpand + depthwise + pointwise
-
forward(self, x)¶
-
-
class
fedlab_core.models.mobilenetv2.MobileNetV2(num_classes=10)¶ Bases:
torch.nn.Module-
cfg= [[1, 16, 1, 1], [6, 24, 2, 1], [6, 32, 3, 2], [6, 64, 4, 2], [6, 96, 3, 1], [6, 160, 3, 2], [6, 320, 1, 1]]¶
-
_make_layers(self, in_planes)¶
-
forward(self, x)¶
-
-
fedlab_core.models.mobilenetv2.test()¶