From 2e5de864fafbf27848c2a3da63553605093227ec Mon Sep 17 00:00:00 2001 From: SigureMo Date: Sat, 1 Jan 2022 02:08:20 +0800 Subject: [PATCH 1/4] add mobilenetv3 cn docs --- docs/api/paddle/vision/Overview_cn.rst | 6 ++- .../vision/models/MobileNetV3Large_cn.rst | 35 ++++++++++++++++ .../vision/models/MobileNetV3Small_cn.rst | 35 ++++++++++++++++ .../vision/models/mobilenet_v3_large_cn.rst | 40 +++++++++++++++++++ .../vision/models/mobilenet_v3_small_cn.rst | 40 +++++++++++++++++++ 5 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 docs/api/paddle/vision/models/MobileNetV3Large_cn.rst create mode 100644 docs/api/paddle/vision/models/MobileNetV3Small_cn.rst create mode 100644 docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst create mode 100644 docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst 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..aa58dd2c2a0 --- /dev/null +++ b/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst @@ -0,0 +1,35 @@ +.. _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。 + - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 + - **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..b8503d777a7 --- /dev/null +++ b/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst @@ -0,0 +1,35 @@ +.. _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。 + - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 + - **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..7eb1e4bb7fb --- /dev/null +++ b/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst @@ -0,0 +1,40 @@ +.. _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。 + - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 + - **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..9f256364647 --- /dev/null +++ b/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst @@ -0,0 +1,40 @@ +.. _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。 + - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 + - **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) From 6c16cc418f73efa7b5be7877154337ddd4631605 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 24 Feb 2022 13:40:37 +0800 Subject: [PATCH 2/4] remove argument last_channel --- docs/api/paddle/vision/models/MobileNetV3Large_cn.rst | 1 - docs/api/paddle/vision/models/MobileNetV3Small_cn.rst | 1 - docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst | 1 - docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst | 1 - 4 files changed, 4 deletions(-) diff --git a/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst b/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst index aa58dd2c2a0..1574f17268a 100644 --- a/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst +++ b/docs/api/paddle/vision/models/MobileNetV3Large_cn.rst @@ -10,7 +10,6 @@ MobileNetV3Large 参数 ::::::::: - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 - - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 diff --git a/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst b/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst index b8503d777a7..3248aa2a82d 100644 --- a/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst +++ b/docs/api/paddle/vision/models/MobileNetV3Small_cn.rst @@ -10,7 +10,6 @@ MobileNetV3Small 参数 ::::::::: - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 - - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 diff --git a/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst b/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst index 7eb1e4bb7fb..d2cba54f99c 100644 --- a/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst +++ b/docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst @@ -10,7 +10,6 @@ mobilenet_v3_large 参数 ::::::::: - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 - - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 返回 diff --git a/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst b/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst index 9f256364647..2f814c799b0 100644 --- a/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst +++ b/docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst @@ -10,7 +10,6 @@ mobilenet_v3_small 参数 ::::::::: - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 - - **last_channel** (int, 可选) - 倒数第二层的通道数。默认值:1280。 - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 返回 From 4349459fd4e611e1a0dd9bc26aa2916edc0ae3f8 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 10 Mar 2022 23:14:27 +0800 Subject: [PATCH 3/4] trigger CI From 35ab554514c5423fcdfd2c35663adaee8d81ef97 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Thu, 10 Mar 2022 23:18:29 +0800 Subject: [PATCH 4/4] trigger CI