diff --git a/docs/api/paddle/vision/Overview_cn.rst b/docs/api/paddle/vision/Overview_cn.rst index d339fbe8952..fef448aa247 100644 --- a/docs/api/paddle/vision/Overview_cn.rst +++ b/docs/api/paddle/vision/Overview_cn.rst @@ -54,6 +54,12 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下: " :ref:`vgg13 ` ", "13层的VGG模型" " :ref:`vgg16 ` ", "16层的VGG模型" " :ref:`vgg19 ` ", "19层的VGG模型" + " :ref:`DenseNet ` ", "DenseNet模型" + " :ref:`densenet121 ` ", "121层的DenseNet模型" + " :ref:`densenet161 ` ", "161层的DenseNet模型" + " :ref:`densenet169 ` ", "169层的DenseNet模型" + " :ref:`densenet201 ` ", "201层的DenseNet模型" + " :ref:`densenet264 ` ", "264层的DenseNet模型" " :ref:`InceptionV3 ` ", "InceptionV3模型" " :ref:`inception_v3 ` ", "InceptionV3模型" diff --git a/docs/api/paddle/vision/models/DenseNet_cn.rst b/docs/api/paddle/vision/models/DenseNet_cn.rst new file mode 100644 index 00000000000..c9a433277cc --- /dev/null +++ b/docs/api/paddle/vision/models/DenseNet_cn.rst @@ -0,0 +1,35 @@ +.. _cn_api_paddle_vision_models_DenseNet: + +DenseNet +------------------------------- + +.. py:class:: paddle.vision.models.DenseNet(layers=121, bn_size=4, dropout=0., num_classes=1000) + + DenseNet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **layers** (int, 可选) - densenet的层数。默认值:121。 + - **bn_size** (int,可选) - 中间层growth rate的拓展倍数。默认值:4。 + - **dropout** (float, 可选) - dropout rate。默认值:0.。 + - **num_classes** (int,可选) - 类别数目,即最后一个全连接层输出的维度。默认值:1000。 + - **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。 + +返回 +::::::::: +DenseNet模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import DenseNet + + # build model + densenet = DenseNet() + + x = paddle.rand([1, 3, 224, 224]) + out = densenet(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/desnet121_cn.rst b/docs/api/paddle/vision/models/desnet121_cn.rst new file mode 100644 index 00000000000..9d4369b0978 --- /dev/null +++ b/docs/api/paddle/vision/models/desnet121_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_densenet121: + +densenet121 +------------------------------- + +.. py:function:: paddle.vision.models.densenet121(pretrained=False, **kwargs) + + 121层的densenet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +densenet121模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import densenet121 + + # build model + model = densenet121() + + # build model and load imagenet pretrained weight + # model = densenet121(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/desnet161_cn.rst b/docs/api/paddle/vision/models/desnet161_cn.rst new file mode 100644 index 00000000000..e52d9267fbb --- /dev/null +++ b/docs/api/paddle/vision/models/desnet161_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_densenet161: + +densenet161 +------------------------------- + +.. py:function:: paddle.vision.models.densenet161(pretrained=False, **kwargs) + + 161层的densenet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +densenet161模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import densenet161 + + # build model + model = densenet161() + + # build model and load imagenet pretrained weight + # model = densenet161(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/desnet169_cn.rst b/docs/api/paddle/vision/models/desnet169_cn.rst new file mode 100644 index 00000000000..44ccbeaa690 --- /dev/null +++ b/docs/api/paddle/vision/models/desnet169_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_densenet169: + +densenet169 +------------------------------- + +.. py:function:: paddle.vision.models.densenet169(pretrained=False, **kwargs) + + 169层的densenet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +densenet169模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import densenet169 + + # build model + model = densenet169() + + # build model and load imagenet pretrained weight + # model = densenet169(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/desnet201_cn.rst b/docs/api/paddle/vision/models/desnet201_cn.rst new file mode 100644 index 00000000000..0144e8ba045 --- /dev/null +++ b/docs/api/paddle/vision/models/desnet201_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_densenet201: + +densenet201 +------------------------------- + +.. py:function:: paddle.vision.models.densenet201(pretrained=False, **kwargs) + + 201层的densenet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +densenet201模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import densenet201 + + # build model + model = densenet201() + + # build model and load imagenet pretrained weight + # model = densenet201(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape) diff --git a/docs/api/paddle/vision/models/desnet264_cn.rst b/docs/api/paddle/vision/models/desnet264_cn.rst new file mode 100644 index 00000000000..ddc20b2fac5 --- /dev/null +++ b/docs/api/paddle/vision/models/desnet264_cn.rst @@ -0,0 +1,34 @@ +.. _cn_api_paddle_vision_models_resnet264: + +densenet264 +------------------------------- + +.. py:function:: paddle.vision.models.densenet264(pretrained=False, **kwargs) + + 264层的densenet模型,来自论文 `"Densely Connected Convolutional Networks" `_ 。 + +参数 +::::::::: + - **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 + +返回 +::::::::: +densenet264模型,Layer的实例。 + +代码示例 +::::::::: +.. code-block:: python + + import paddle + from paddle.vision.models import densenet264 + + # build model + model = densenet264() + + # build model and load imagenet pretrained weight + # model = densenet264(pretrained=True) + + x = paddle.rand([1, 3, 224, 224]) + out = model(x) + + print(out.shape)