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