Skip to content

Commit

Permalink
add MobileNetV3 cn docs (PaddlePaddle#4176)
Browse files Browse the repository at this point in the history
* add mobilenetv3 cn docs

* remove argument last_channel

* trigger CI

* trigger CI
  • Loading branch information
SigureMo authored Mar 10, 2022
1 parent b2e98cc commit e207a99
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/api/paddle/vision/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下:
" :ref:`AlexNet <cn_api_paddle_vision_models_AlexNet>` ", "AlexNet模型"
" :ref:`alexnet <cn_api_paddle_vision_models_alexnet>` ", "AlexNet模型"
" :ref:`MobileNetV1 <cn_api_paddle_vision_models_MobileNetV1>` ", "MobileNetV1模型"
" :ref:`MobileNetV2 <cn_api_paddle_vision_models_MobileNetV2>` ", "MobileNetV2模型"
" :ref:`mobilenet_v1 <cn_api_paddle_vision_models_mobilenet_v1>` ", "MobileNetV1模型"
" :ref:`MobileNetV2 <cn_api_paddle_vision_models_MobileNetV2>` ", "MobileNetV2模型"
" :ref:`mobilenet_v2 <cn_api_paddle_vision_models_mobilenet_v2>` ", "MobileNetV2模型"
" :ref:`MobileNetV3Small <cn_api_paddle_vision_models_MobileNetV3Small>` ", "MobileNetV3Small模型"
" :ref:`MobileNetV3Large <cn_api_paddle_vision_models_MobileNetV3Large>` ", "MobileNetV3Large模型"
" :ref:`mobilenet_v3_small <cn_api_paddle_vision_models_mobilenet_v3_small>` ", "MobileNetV3Small模型"
" :ref:`mobilenet_v3_large <cn_api_paddle_vision_models_mobilenet_v3_large>` ", "MobileNetV3Large模型"
" :ref:`ResNet <cn_api_paddle_vision_models_ResNet>` ", "ResNet模型"
" :ref:`resnet18 <cn_api_paddle_vision_models_resnet18>` ", "18层的ResNet模型"
" :ref:`resnet34 <cn_api_paddle_vision_models_resnet34>` ", "34层的ResNet模型"
Expand Down
34 changes: 34 additions & 0 deletions docs/api/paddle/vision/models/MobileNetV3Large_cn.rst
Original file line number Diff line number Diff line change
@@ -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" <https://arxiv.org/abs/1905.02244>`_ 。

参数
:::::::::
- **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)
34 changes: 34 additions & 0 deletions docs/api/paddle/vision/models/MobileNetV3Small_cn.rst
Original file line number Diff line number Diff line change
@@ -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" <https://arxiv.org/abs/1905.02244>`_ 。

参数
:::::::::
- **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)
39 changes: 39 additions & 0 deletions docs/api/paddle/vision/models/mobilenet_v3_large_cn.rst
Original file line number Diff line number Diff line change
@@ -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" <https://arxiv.org/abs/1905.02244>`_ 。

参数
:::::::::
- **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)
39 changes: 39 additions & 0 deletions docs/api/paddle/vision/models/mobilenet_v3_small_cn.rst
Original file line number Diff line number Diff line change
@@ -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" <https://arxiv.org/abs/1905.02244>`_ 。

参数
:::::::::
- **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)

0 comments on commit e207a99

Please sign in to comment.