diff --git a/docs/api/paddle/vision/Overview_cn.rst b/docs/api/paddle/vision/Overview_cn.rst index 4910625bbf4..4e5b45ef264 100644 --- a/docs/api/paddle/vision/Overview_cn.rst +++ b/docs/api/paddle/vision/Overview_cn.rst @@ -71,6 +71,14 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下: " :ref:`inception_v3 ` ", "InceptionV3模型" " :ref:`GoogLeNet ` ", "GoogLeNet模型" " :ref:`googlenet ` ", "GoogLeNet模型" + " :ref:`ShuffleNetV2 ` ", "ShuffleNetV2模型" + " :ref:`shufflenet_v2_x0_25 ` ", "输出通道缩放比例为 0.25 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_x0_33 ` ", "输出通道缩放比例为 0.33 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_x0_5 ` ", "输出通道缩放比例为 0.5 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_x1_0 ` ", "输出通道缩放比例为 1.0 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_x1_5 ` ", "输出通道缩放比例为 1.5 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_x2_0 ` ", "输出通道缩放比例为 2.0 的 ShuffleNetV2 模型" + " :ref:`shufflenet_v2_swish ` ", "使用 swish 进行激活的 ShuffleNetV2 模型" .. _about_ops: diff --git a/docs/api/paddle/vision/models/ShuffleNetV2_cn.rst b/docs/api/paddle/vision/models/ShuffleNetV2_cn.rst new file mode 100644 index 00000000000..9c5fa2a3cb8 --- /dev/null +++ b/docs/api/paddle/vision/models/ShuffleNetV2_cn.rst @@ -0,0 +1,33 @@ +.. _cn_api_paddle_vision_models_ShuffleNetV2: + +ShuffleNetV2 +------------------------------- + +.. py:class:: paddle.vision.models.ShuffleNetV2(scale=1.0, act="relu", num_classes=1000, with_pool=True) + + ShuffleNetV2模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。 + - **act** (str, 可选) - 网络中使用的激活函数。默认值:"relu"。 + - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 + - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 + +返回 +::::::::: +ShuffleNetV2模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import ShuffleNetV2 + + shufflenet_v2_swish = ShuffleNetV2(scale=1.0, act="swish") + + x = paddle.rand([1, 3, 224, 224]) + out = shufflenet_v2_swish(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_swish_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_swish_cn.rst new file mode 100644 index 00000000000..009fe06ff1a --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_swish_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_swish: + +shufflenet_v2_swish +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_swish(pretrained=False, **kwargs) + + 使用 swish 进行激活的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_swish模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_swish + + # build model + model = shufflenet_v2_swish() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_swish(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x0_25_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x0_25_cn.rst new file mode 100644 index 00000000000..2f25de99aa4 --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x0_25_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x0_25: + +shufflenet_v2_x0_25 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x0_25(pretrained=False, **kwargs) + + 输出通道缩放比例为 0.25 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x0_25模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x0_25 + + # build model + model = shufflenet_v2_x0_25() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x0_25(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x0_33_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x0_33_cn.rst new file mode 100644 index 00000000000..4089ee17ec5 --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x0_33_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x0_33: + +shufflenet_v2_x0_33 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x0_33(pretrained=False, **kwargs) + + 输出通道缩放比例为 0.25 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x0_33模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x0_33 + + # build model + model = shufflenet_v2_x0_33() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x0_33(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x0_5_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x0_5_cn.rst new file mode 100644 index 00000000000..2d17f425c8c --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x0_5_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x0_5: + +shufflenet_v2_x0_5 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x0_5(pretrained=False, **kwargs) + + 输出通道缩放比例为 0.5 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x0_5模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x0_5 + + # build model + model = shufflenet_v2_x0_5() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x0_5(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x1_0_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x1_0_cn.rst new file mode 100644 index 00000000000..e412623e326 --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x1_0_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x1_0: + +shufflenet_v2_x1_0 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x1_0(pretrained=False, **kwargs) + + 输出通道缩放比例为 1.0 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x1_0模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x1_0 + + # build model + model = shufflenet_v2_x1_0() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x1_0(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x1_5_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x1_5_cn.rst new file mode 100644 index 00000000000..2410f4089d2 --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x1_5_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x1_5: + +shufflenet_v2_x1_5 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x1_5(pretrained=False, **kwargs) + + 输出通道缩放比例为 1.5 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x1_5模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x1_5 + + # build model + model = shufflenet_v2_x1_5() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x1_5(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/shufflenet_v2_x2_0_cn.rst b/docs/api/paddle/vision/models/shufflenet_v2_x2_0_cn.rst new file mode 100644 index 00000000000..15604a1b580 --- /dev/null +++ b/docs/api/paddle/vision/models/shufflenet_v2_x2_0_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_shufflenet_v2_x2_0: + +shufflenet_v2_x2_0 +------------------------------- + +.. py:function:: paddle.vision.models.shufflenet_v2_x2_0(pretrained=False, **kwargs) + + 输出通道缩放比例为 2.0 的 ShuffleNetV2 模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +shufflenet_v2_x2_0模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import shufflenet_v2_x2_0 + + # build model + model = shufflenet_v2_x2_0() + + # build model and load imagenet pretrained weight + # model = shufflenet_v2_x2_0(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape)