diff --git a/docs/api/paddle/vision/Overview_cn.rst b/docs/api/paddle/vision/Overview_cn.rst index 9264cbd8432..694a37b5e2f 100644 --- a/docs/api/paddle/vision/Overview_cn.rst +++ b/docs/api/paddle/vision/Overview_cn.rst @@ -40,9 +40,13 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下: " :ref:`AlexNet ` ", "AlexNet模型" " :ref:`alexnet ` ", "AlexNet模型" " :ref:`MobileNetV1 ` ", "MobileNetV1模型" - " :ref:`MobileNetV2 ` ", "MobileNetV2模型" " :ref:`mobilenet_v1 ` ", "MobileNetV1模型" + " :ref:`MobileNetV2 ` ", "MobileNetV2模型" " :ref:`mobilenet_v2 ` ", "MobileNetV2模型" + " :ref:`MobileNetV3Small ` ", "MobileNetV3Small模型" + " :ref:`MobileNetV3Large ` ", "MobileNetV3Large模型" + " :ref:`mobilenet_v3_small ` ", "MobileNetV3Small模型" + " :ref:`mobilenet_v3_large ` ", "MobileNetV3Large模型" " :ref:`ResNet ` ", "ResNet模型" " :ref:`resnet18 ` ", "18层的ResNet模型" " :ref:`resnet34 ` ", "34层的ResNet模型" diff --git a/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst b/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst new file mode 100644 index 00000000000..1574f17268a --- /dev/null +++ b/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_MobileNetV3Large: + +MobileNetV3Large +------------------------------- + +.. py:class:: paddle.vision.models.MobileNetV3Large(scale=1.0, last_channel=1280, num_classes=1000, with_pool=True) + + MobileNetV3Large模型,来自论文 `"Searching for MobileNetV3" `_ 。 + +参数 +::::::::: + - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 + - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 + - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 + +返回 +::::::::: +mobilenetv3 large模型,Layer的实例。 + +代码示例 +::::::::: + +.. code-block:: python + + import paddle + from paddle.vision.models import MobileNetV3Large + + # build model + model = MobileNetV3Large(scale=1.0) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst b/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst new file mode 100644 index 00000000000..3248aa2a82d --- /dev/null +++ b/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_MobileNetV3Small: + +MobileNetV3Small +------------------------------- + +.. py:class:: paddle.vision.models.MobileNetV3Small(scale=1.0, last_channel=1280, num_classes=1000, with_pool=True) + + MobileNetV3Small模型,来自论文 `"Searching for MobileNetV3" `_ 。 + +参数 +::::::::: + - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 + - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 + - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 + +返回 +::::::::: +mobilenetv3 small模型,Layer的实例。 + +代码示例 +::::::::: + +.. code-block:: python + + import paddle + from paddle.vision.models import MobileNetV3Small + + # build model + model = MobileNetV3Small(scale=1.0) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst b/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst new file mode 100644 index 00000000000..d2cba54f99c --- /dev/null +++ b/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst @@ -0,0 +1,39 @@ +.. _cn_api_paddle_vision_models_mobilenet_v3_large: + +mobilenet_v3_large +------------------------------- + +.. py:function:: paddle.vision.models.mobilenet_v3_large(pretrained=False, scale=1.0, last_channel=1280, **kwargs) + + MobileNetV3Large模型,来自论文 `"Searching for MobileNetV3" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 + +返回 +::::::::: +mobilenetv3 large模型,Layer的实例。 + +代码示例 +::::::::: + +.. code-block:: python + + import paddle + from paddle.vision.models import mobilenet_v3_large + + # build model + model = mobilenet_v3_large() + + # build model and load imagenet pretrained weight + # model = mobilenet_v3_large(pretrained=True) + + # build mobilenet v3 large model with scale=0.5 + model = mobilenet_v3_large(scale=0.5) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst b/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst new file mode 100644 index 00000000000..2f814c799b0 --- /dev/null +++ b/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst @@ -0,0 +1,39 @@ +.. _cn_api_paddle_vision_models_mobilenet_v3_small: + +mobilenet_v3_small +------------------------------- + +.. py:function:: paddle.vision.models.mobilenet_v3_small(pretrained=False, scale=1.0, last_channel=1280, **kwargs) + + MobileNetV3Small模型,来自论文 `"Searching for MobileNetV3" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 + +返回 +::::::::: +mobilenetv3 small模型,Layer的实例。 + +代码示例 +::::::::: + +.. code-block:: python + + import paddle + from paddle.vision.models import mobilenet_v3_small + + # build model + model = mobilenet_v3_small() + + # build model and load imagenet pretrained weight + # model = mobilenet_v3_small(pretrained=True) + + # build mobilenet v3 small model with scale=0.5 + model = mobilenet_v3_small(scale=0.5) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape)