diff --git a/docs/api/paddle/vision/Overview_cn.rst b/docs/api/paddle/vision/Overview_cn.rst index 694a37b5e2f..dd3ea47b76e 100644 --- a/docs/api/paddle/vision/Overview_cn.rst +++ b/docs/api/paddle/vision/Overview_cn.rst @@ -55,7 +55,6 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下: " :ref:`resnet152 ` ", "152层的ResNet模型" " :ref:`wide_resnet50_2 ` ", "50层的WideResNet模型" " :ref:`wide_resnet101_2 ` ", "101层的WideResNet模型" - " :ref:`ResNeXt ` ", "ResNeXt模型" " :ref:`resnext50_32x4d ` ", "ResNeXt-50 32x4d模型" " :ref:`resnext50_64x4d ` ", "ResNeXt-50 64x4d模型" " :ref:`resnext101_32x4d ` ", "ResNeXt-101 32x4d模型" diff --git a/docs/api/paddle/vision/models/ResNeXt_cn.rst b/docs/api/paddle/vision/models/ResNeXt_cn.rst deleted file mode 100644 index 9483cca4a1b..00000000000 --- a/docs/api/paddle/vision/models/ResNeXt_cn.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. _cn_api_paddle_vision_models_ResNeXt: - -ResNeXt -------------------------------- - -.. py:class:: paddle.vision.models.ResNeXt(layers=50, cardinality=32, num_classes=1000, with_pool=True) - - ResNeXt模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 - -参数 -::::::::: - - **layers** (int,可选) - ResNeXt 模型的深度。默认值:50 - - **cardinality** (int,可选) - 模型基数,也即划分组的数量。默认值:32 - - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 - - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 - -返回 -::::::::: -ResNeXt模型,Layer的实例。 - -代码示例 -::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import ResNeXt - - resnext50_32x4d = ResNeXt(depth=50, cardinality=32) - - x = paddle.rand([1, 3, 224, 224]) - out = resnext50_32x4d(x) - - print(out.shape) \ No newline at end of file diff --git a/docs/api/paddle/vision/models/ResNet_cn.rst b/docs/api/paddle/vision/models/ResNet_cn.rst index f3d4e9ca2e9..993f368deb5 100644 --- a/docs/api/paddle/vision/models/ResNet_cn.rst +++ b/docs/api/paddle/vision/models/ResNet_cn.rst @@ -3,37 +3,27 @@ ResNet ------------------------------- -.. py:class:: paddle.vision.models.ResNet(Block, depth=50, width=64, num_classes=1000, with_pool=True) +.. py:class:: paddle.vision.models.ResNet(Block, depth=50, width=64, num_classes=1000, with_pool=True, groups=1) - ResNet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: + - **Block** (BasicBlock|BottleneckBlock) - 模型的残差模块。 - - **depth** (int,可选) - resnet模型的深度。默认值:50。 - - **width** (int,可选) - resnet模型的基础宽度。默认值:64。 - - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。 + - **depth** (int,可选) - ResNet 模型的深度。默认值:50。 + - **width** (int,可选) - 各个卷积块的每个卷积组基础宽度。默认值:64。 + - **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于 0,则不定义最后一个全连接层。默认值:1000。 - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 + - **groups** (int,可选) - 各个卷积块的分组数。默认值:1。 返回 ::::::::: -ResNet模型,Layer的实例。 + +ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import ResNet - from paddle.vision.models.resnet import BottleneckBlock, BasicBlock - - resnet50 = ResNet(BottleneckBlock, 50) - - wide_resnet50_2 = ResNet(BottleneckBlock, 50, width=64*2) - - resnet18 = ResNet(BasicBlock, 18) - - x = paddle.rand([1, 3, 224, 224]) - out = resnet18(x) - print(out.shape) +COPY-FROM: paddle.vision.models.ResNet diff --git a/docs/api/paddle/vision/models/resnet101_cn.rst b/docs/api/paddle/vision/models/resnet101_cn.rst index 35cd2011a83..188cdc94459 100644 --- a/docs/api/paddle/vision/models/resnet101_cn.rst +++ b/docs/api/paddle/vision/models/resnet101_cn.rst @@ -5,30 +5,20 @@ resnet101 .. py:function:: paddle.vision.models.resnet101(pretrained=False, **kwargs) - 101层的resnet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +101 层的 ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnet101模型,Layer的实例。 + +101 层的 ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnet101 - - # build model - model = resnet101() - - # build model and load imagenet pretrained weight - # model = resnet101(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnet101 diff --git a/docs/api/paddle/vision/models/resnet152_cn.rst b/docs/api/paddle/vision/models/resnet152_cn.rst index 68d3178c069..4273d9064d3 100644 --- a/docs/api/paddle/vision/models/resnet152_cn.rst +++ b/docs/api/paddle/vision/models/resnet152_cn.rst @@ -5,30 +5,20 @@ resnet152 .. py:function:: paddle.vision.models.resnet152(pretrained=False, **kwargs) - 152层的resnet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +152 层的 ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnet152模型,Layer的实例。 + +152 层的 ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnet152 - - # build model - model = resnet152() - - # build model and load imagenet pretrained weight - # model = resnet152(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnet152 diff --git a/docs/api/paddle/vision/models/resnet18_cn.rst b/docs/api/paddle/vision/models/resnet18_cn.rst index 512eb30a180..b2ff670742a 100644 --- a/docs/api/paddle/vision/models/resnet18_cn.rst +++ b/docs/api/paddle/vision/models/resnet18_cn.rst @@ -5,30 +5,20 @@ resnet18 .. py:function:: paddle.vision.models.resnet18(pretrained=False, **kwargs) - 18层的resnet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +18 层的 ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnet18模型,Layer的实例。 + +18 层的 ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnet18 - - # build model - model = resnet18() - - # build model and load imagenet pretrained weight - # model = resnet18(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnet18 diff --git a/docs/api/paddle/vision/models/resnet34_cn.rst b/docs/api/paddle/vision/models/resnet34_cn.rst index ecc0fb424be..cf2b4038400 100644 --- a/docs/api/paddle/vision/models/resnet34_cn.rst +++ b/docs/api/paddle/vision/models/resnet34_cn.rst @@ -5,30 +5,20 @@ resnet34 .. py:function:: paddle.vision.models.resnet34(pretrained=False, **kwargs) - 34层的resnet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +34 层的 ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnet34模型,Layer的实例。 + +34 层的 ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnet34 - - # build model - model = resnet34() - - # build model and load imagenet pretrained weight - # model = resnet34(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnet34 diff --git a/docs/api/paddle/vision/models/resnet50_cn.rst b/docs/api/paddle/vision/models/resnet50_cn.rst index d9bb69734e5..97370099fd3 100644 --- a/docs/api/paddle/vision/models/resnet50_cn.rst +++ b/docs/api/paddle/vision/models/resnet50_cn.rst @@ -5,30 +5,20 @@ resnet50 .. py:function:: paddle.vision.models.resnet50(pretrained=False, **kwargs) - 50层的resnet模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 + +50 层的 ResNet 模型,来自论文 `"Deep Residual Learning for Image Recognition" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnet50模型,Layer的实例。 + +50 层的 ResNet 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnet50 - - # build model - model = resnet50() - - # build model and load imagenet pretrained weight - # model = resnet50(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnet50 diff --git a/docs/api/paddle/vision/models/resnext101_32x4d_cn.rst b/docs/api/paddle/vision/models/resnext101_32x4d_cn.rst index f4536b0109e..17ee342057d 100644 --- a/docs/api/paddle/vision/models/resnext101_32x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext101_32x4d_cn.rst @@ -5,30 +5,20 @@ resnext101_32x4d .. py:function:: paddle.vision.models.resnext101_32x4d(pretrained=False, **kwargs) - ResNeXt-101 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-101 32x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext101_32x4d模型,Layer的实例。 + +ResNeXt-101 32x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext101_32x4d - - # build model - model = resnext101_32x4d() - - # build model and load imagenet pretrained weight - # model = resnext101_32x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext101_32x4d diff --git a/docs/api/paddle/vision/models/resnext101_64x4d_cn.rst b/docs/api/paddle/vision/models/resnext101_64x4d_cn.rst index ea7ada6e16b..d984fbc27c6 100644 --- a/docs/api/paddle/vision/models/resnext101_64x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext101_64x4d_cn.rst @@ -5,30 +5,20 @@ resnext101_64x4d .. py:function:: paddle.vision.models.resnext101_64x4d(pretrained=False, **kwargs) - ResNeXt-101 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-101 64x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext101_64x4d模型,Layer的实例。 + +ResNeXt-101 64x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext101_64x4d - - # build model - model = resnext101_64x4d() - - # build model and load imagenet pretrained weight - # model = resnext101_64x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext101_64x4d diff --git a/docs/api/paddle/vision/models/resnext152_32x4d_cn.rst b/docs/api/paddle/vision/models/resnext152_32x4d_cn.rst index baa59e8d173..4bd223c7386 100644 --- a/docs/api/paddle/vision/models/resnext152_32x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext152_32x4d_cn.rst @@ -5,30 +5,20 @@ resnext152_32x4d .. py:function:: paddle.vision.models.resnext152_32x4d(pretrained=False, **kwargs) - ResNeXt-152 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-152 32x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext152_32x4d模型,Layer的实例。 + +ResNeXt-152 32x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext152_32x4d - - # build model - model = resnext152_32x4d() - - # build model and load imagenet pretrained weight - # model = resnext152_32x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext152_32x4d diff --git a/docs/api/paddle/vision/models/resnext152_64x4d_cn.rst b/docs/api/paddle/vision/models/resnext152_64x4d_cn.rst index 585d8c5a956..21789ac464e 100644 --- a/docs/api/paddle/vision/models/resnext152_64x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext152_64x4d_cn.rst @@ -5,30 +5,20 @@ resnext152_64x4d .. py:function:: paddle.vision.models.resnext152_64x4d(pretrained=False, **kwargs) - ResNeXt-152 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-152 64x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext152_64x4d模型,Layer的实例。 + +ResNeXt-152 64x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext152_64x4d - - # build model - model = resnext152_64x4d() - - # build model and load imagenet pretrained weight - # model = resnext152_64x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext152_64x4d diff --git a/docs/api/paddle/vision/models/resnext50_32x4d_cn.rst b/docs/api/paddle/vision/models/resnext50_32x4d_cn.rst index 0850861a243..2cea0a14603 100644 --- a/docs/api/paddle/vision/models/resnext50_32x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext50_32x4d_cn.rst @@ -5,30 +5,20 @@ resnext50_32x4d .. py:function:: paddle.vision.models.resnext50_32x4d(pretrained=False, **kwargs) - ResNeXt-50 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-50 32x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext50_32x4d模型,Layer的实例。 + +ResNeXt-50 32x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext50_32x4d - - # build model - model = resnext50_32x4d() - - # build model and load imagenet pretrained weight - # model = resnext50_32x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext50_32x4d diff --git a/docs/api/paddle/vision/models/resnext50_64x4d_cn.rst b/docs/api/paddle/vision/models/resnext50_64x4d_cn.rst index 1f81e17e13c..7b2101b4e73 100644 --- a/docs/api/paddle/vision/models/resnext50_64x4d_cn.rst +++ b/docs/api/paddle/vision/models/resnext50_64x4d_cn.rst @@ -5,30 +5,20 @@ resnext50_64x4d .. py:function:: paddle.vision.models.resnext50_64x4d(pretrained=False, **kwargs) - ResNeXt-50 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 + +ResNeXt-50 64x4d 模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -resnext50_64x4d模型,Layer的实例。 + +ResNeXt-50 64x4d 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import resnext50_64x4d - - # build model - model = resnext50_64x4d() - - # build model and load imagenet pretrained weight - # model = resnext50_64x4d(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.resnext50_64x4d diff --git a/docs/api/paddle/vision/models/wide_resnet101_2_cn.rst b/docs/api/paddle/vision/models/wide_resnet101_2_cn.rst index 113db2965b4..8997279ce12 100644 --- a/docs/api/paddle/vision/models/wide_resnet101_2_cn.rst +++ b/docs/api/paddle/vision/models/wide_resnet101_2_cn.rst @@ -5,30 +5,20 @@ wide_resnet101_2 .. py:function:: paddle.vision.models.wide_resnet101_2(pretrained=False, **kwargs) - 101层的wide_resnet模型,来自论文 `"Wide Residual Networks" `_ 。 + +Wide ResNet-101-2 模型,来自论文 `"Wide Residual Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -wide_resnet101_2模型,Layer的实例。 + +Wide ResNet-101-2 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import wide_resnet101_2 - - # build model - model = wide_resnet101_2() - - # build model and load imagenet pretrained weight - # model = wide_resnet101_2(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.wide_resnet101_2 diff --git a/docs/api/paddle/vision/models/wide_resnet50_2_cn.rst b/docs/api/paddle/vision/models/wide_resnet50_2_cn.rst index a775521412f..79fe660770a 100644 --- a/docs/api/paddle/vision/models/wide_resnet50_2_cn.rst +++ b/docs/api/paddle/vision/models/wide_resnet50_2_cn.rst @@ -5,30 +5,20 @@ wide_resnet50_2 .. py:function:: paddle.vision.models.wide_resnet50_2(pretrained=False, **kwargs) - 50层的wide_resnet模型,来自论文 `"Wide Residual Networks" `_ 。 + +Wide ResNet-50-2 模型,来自论文 `"Wide Residual Networks" `_ 。 参数 ::::::::: - - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + + - **pretrained** (bool,可选) - 是否加载预训练权重。如果为 True,则返回在 ImageNet 上预训练的模型。默认值:False。 返回 ::::::::: -wide_resnet50_2模型,Layer的实例。 + +Wide ResNet-50-2 模型,:ref:`cn_api_fluid_dygraph_Layer` 的实例。 代码示例 ::::::::: -.. code-block:: python - - import paddle - from paddle.vision.models import wide_resnet50_2 - - # build model - model = wide_resnet50_2() - - # build model and load imagenet pretrained weight - # model = wide_resnet50_2(pretrained=True) - - x = paddle.rand([1, 3, 224, 224]) - out = model(x) - print(out.shape) +COPY-FROM: paddle.vision.models.wide_resnet50_2 diff --git a/docs/release_note_cn.md b/docs/release_note_cn.md index 7a3df48682f..f27bdf550d5 100644 --- a/docs/release_note_cn.md +++ b/docs/release_note_cn.md @@ -11,13 +11,13 @@ - 新增 4 个自动微分 API,11 个线性代数 API,21 个概率分布类 API,更好地支持科学计算、强化学习等场景。 -- 新增 11 个 稀疏张量计算 API,支持创建 COO、CRS 格式的 Sparse Tensor 以及与 Tensor 互相转换等基础功能。 +- 新增 11 个 稀疏张量计算 API,支持创建 COO、CSR 格式的 Sparse Tensor 以及与 Tensor 互相转换等基础功能。 - 新增 9 个框架性能分析 API,以`paddle.profiler.Profiler`为核心,提供对训练、推理过程中性能数据的收集、导出和统计的功能。 - 新增 7 个硬件设备管理 API,更好支持硬件相关信息获取。 -- 新增多个视觉、文本领域 API,方便复用 MobileNetV3, ResNeXt等骨干网络,实现快速组网。 +- 新增多个视觉、文本领域 API,方便复用 MobileNetV3, ResNeXt 等骨干网络,实现快速组网。 ### 飞桨高可复用算子库 PHI @@ -256,7 +256,7 @@ AssertionError: elu_ only support alpha >= 0, please use elu instead. - 新增 `paddle.vision.models.MobileNetV3Small`、 `paddle.vision.models.MobileNetV3Large`、`paddle.vision.models.mobilenet_v3_small`、`paddle.vision.models.mobilenet_v3_large`,支持直接使用 MobileNetV3 模型。([#38653](https://github.com/PaddlePaddle/Paddle/pull/38653)) - - 新增 `paddle.vision.models.ResNeXt`、 `paddle.vision.models.resnext50_32x4d`、 `paddle.vision.models.resnext50_64x4d`、`paddle.vision.models.resnext101_32x4d`、`paddle.vision.models.resnext101_64x4d`、`paddle.vision.models.resnext152_32x4d`、`paddle.vision.models.resnext152_64x4d`,支持直接使用 ResNeXt 模型。([#36070](https://github.com/PaddlePaddle/Paddle/pull/36070)) + - 新增 `paddle.vision.models.resnext50_32x4d`、 `paddle.vision.models.resnext50_64x4d`、`paddle.vision.models.resnext101_32x4d`、`paddle.vision.models.resnext101_64x4d`、`paddle.vision.models.resnext152_32x4d`、`paddle.vision.models.resnext152_64x4d`,支持直接使用 ResNeXt 模型。([#36070](https://github.com/PaddlePaddle/Paddle/pull/36070)) - 新增 `paddle.vision.models.ShuffleNetV2`、 `paddle.vision.models.shufflenet_v2_x0_25`、`paddle.vision.models.shufflenet_v2_x0_33`、`paddle.vision.models.shufflenet_v2_x0_5`、`paddle.vision.models.shufflenet_v2_x1_0`、`paddle.vision.models.shufflenet_v2_x1_5`、`paddle.vision.models.shufflenet_v2_x2_0`、`paddle.vision.models.shufflenet_v2_swish`,支持直接使用 ShuffleNetV2 模型。([#36067](https://github.com/PaddlePaddle/Paddle/pull/36067)) @@ -272,7 +272,7 @@ AssertionError: elu_ only support alpha >= 0, please use elu instead. - 新增 `paddle.text.ViterbiDecoder`、`paddle.text.viterbi_decode` Viterbi 解码 API,主要用于序列标注模型的预测。 ([#35778](https://github.com/PaddlePaddle/Paddle/pull/35778)) -- 新增 11 个 Sparse 类 API,支持创建 COO、CRS 格式的Sparse Tensor,与 Tensor 互相转换等基础功能: +- 新增 11 个 Sparse 类 API,支持创建 COO、CSR 格式的Sparse Tensor,与 Tensor 互相转换等基础功能: - `paddle.sparse.sparse_coo_tensor`,创建 COO 格式的 Sparse Tensor。 ([#40780](https://github.com/PaddlePaddle/Paddle/pull/40780)) diff --git a/docs/release_note_en.md b/docs/release_note_en.md index 4969c710d50..de55218567b 100644 --- a/docs/release_note_en.md +++ b/docs/release_note_en.md @@ -262,7 +262,7 @@ AssertionError: elu_ only support alpha >= 0, please use elu instead. - Add `paddle.vision.models.MobileNetV3Small`, `paddle.vision.models.MobileNetV3Large`, `paddle.vision.models.mobilenet_v3_small`, and `paddle.vision.models.mobilenet_v3_large`, to use MobileNetV3 models directly . ([#38653](https://github.com/PaddlePaddle/Paddle/pull/38653)) - - Add `paddle.vision.models.ResNeXt`, `paddle.vision.models.resnext50_32x4d`, `paddle.vision.models.resnext50_64x4d`, `paddle.vision.models. paddle.vision.models.resnext101_32x4d`, `paddle.vision.models.resnext101_64x4d`, `paddle.vision.models.resnext152_32x4d`, and `paddle.vision.models.resnext152_64x4d`, to use ResNeXt models directly. ([#36070](https://github.com/PaddlePaddle/Paddle/pull/36070)) + - Add `paddle.vision.models.resnext50_32x4d`, `paddle.vision.models.resnext50_64x4d`, `paddle.vision.models. paddle.vision.models.resnext101_32x4d`, `paddle.vision.models.resnext101_64x4d`, `paddle.vision.models.resnext152_32x4d`, and `paddle.vision.models.resnext152_64x4d`, to use ResNeXt models directly. ([#36070](https://github.com/PaddlePaddle/Paddle/pull/36070)) - Add `paddle.vision.models.ShuffleNetV2`, `paddle.vision.models.shufflenet_v2_x0_25`, `paddle.vision.models.shufflenet_v2_x0_33`, `paddle.vision.models.shufflenet_v2_x0_5`, `paddle.vision.models.shufflenet_v2_x1_0`, `paddle.vision.models.shufflenet_v2_x1_5`, `paddle.vision.models.shufflenet_v2_x2_0`, and `paddle.vision.models.shufflenet_v2_swish`, to use ShuffleNetV2 models directly ([#36067](https://github.com/PaddlePaddle/Paddle/pull/36067)) @@ -278,7 +278,7 @@ AssertionError: elu_ only support alpha >= 0, please use elu instead. - Add `paddle.text.ViterbiDecoder`, and `paddle.text.viterbi_decode` Viterbi decoding API, mainly for sequence tagging model prediction. ([#35778](https://github.com/PaddlePaddle/Paddle/pull/35778)) -- Add 11 Sparse class APIs, to support basic functions, such as creating Sparse Tensor in COO and CRS formats, and add C++ inter-converting with Tensor. +- Add 11 Sparse class APIs, to support basic functions, such as creating Sparse Tensor in COO and CSR formats, and add C++ inter-converting with Tensor. - `paddle.sparse.sparse_coo_tensor`,create Sparse Tensor in COO format. ([#40780](https://github.com/PaddlePaddle/Paddle/pull/40780))