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.
[PaddlePaddle Hackathon] add ResNeXt zh doc (PaddlePaddle#3922)
* add resnext * sync with en docs Co-authored-by: Ainavo <[email protected]> * fix arguments * add resnext into overview * update resnext API * update API parameters * layers -> depth * trigger CI Co-authored-by: Ainavo <[email protected]>
- Loading branch information
Showing
8 changed files
with
244 additions
and
1 deletion.
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,33 @@ | ||
.. _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" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **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) |
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_resnext101_32x4d: | ||
|
||
resnext101_32x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext101_32x4d(pretrained=False, **kwargs) | ||
ResNeXt-101 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext101_32x4d模型,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) |
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_resnext101_64x4d: | ||
|
||
resnext101_64x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext101_64x4d(pretrained=False, **kwargs) | ||
ResNeXt-101 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext101_64x4d模型,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) |
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_resnext152_32x4d: | ||
|
||
resnext152_32x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext152_32x4d(pretrained=False, **kwargs) | ||
ResNeXt-152 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext152_32x4d模型,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) |
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_resnext152_64x4d: | ||
|
||
resnext152_64x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext152_64x4d(pretrained=False, **kwargs) | ||
ResNeXt-152 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext152_64x4d模型,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) |
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_resnext50_32x4d: | ||
|
||
resnext50_32x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext50_32x4d(pretrained=False, **kwargs) | ||
ResNeXt-50 32x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext50_32x4d模型,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) |
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_resnext50_64x4d: | ||
|
||
resnext50_64x4d | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.resnext50_64x4d(pretrained=False, **kwargs) | ||
ResNeXt-50 64x4d模型,来自论文 `"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
返回 | ||
::::::::: | ||
resnext50_64x4d模型,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) |