forked from PaddlePaddle/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add densenet docs (PaddlePaddle#3923)
* add densenet docs * Update DenseNet_cn.rst * Update desnet264_cn.rst * update DenseNet_cn.rst * merge conflicts & add Overview * update code-block
- Loading branch information
Showing
7 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" <https://arxiv.org/abs/1608.06993>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |