Skip to content

Commit a43483e

Browse files
committed
add shufflenet
1 parent a150cc5 commit a43483e

File tree

8 files changed

+270
-0
lines changed

8 files changed

+270
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. _cn_api_paddle_vision_models_ShuffleNetV2:
2+
3+
ShuffleNetV2
4+
-------------------------------
5+
6+
.. py:class:: paddle.vision.models.ShuffleNetV2(num_classes=1000, scale=1.0, act="relu")
7+
8+
ShuffleNetV2模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。
13+
- **scale** (float,可选) - 模型通道数的缩放比例。默认值:1.0。
14+
- **act** (激活函数) - 网络中使用的激活函数。默认值:"relu"。
15+
16+
返回
17+
:::::::::
18+
ShuffleNetV2模型,Layer的实例。
19+
20+
代码示例
21+
:::::::::
22+
.. code-block:: python
23+
24+
import paddle
25+
from paddle.vision.models import ShuffleNetV2
26+
27+
shufflenet_v2_swish = ShuffleNetV2(scale=1.0, act="swish")
28+
29+
x = paddle.rand([1, 3, 224, 224])
30+
out = shufflenet_v2_swish(x)
31+
32+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_swish:
2+
3+
shufflenet_v2_swish
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_swish(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_swish模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_swish模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_swish
24+
25+
# build model
26+
model = shufflenet_v2_swish()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_swish(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x0_25:
2+
3+
shufflenet_v2_x0_25
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x0_25(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x0_25模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x0_25模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x0_25
24+
25+
# build model
26+
model = shufflenet_v2_x0_25()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x0_25(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x0_33:
2+
3+
shufflenet_v2_x0_33
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x0_33(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x0_33模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x0_33模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x0_33
24+
25+
# build model
26+
model = shufflenet_v2_x0_33()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x0_33(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x0_5:
2+
3+
shufflenet_v2_x0_5
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x0_5(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x0_5模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x0_5模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x0_5
24+
25+
# build model
26+
model = shufflenet_v2_x0_5()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x0_5(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x1_0:
2+
3+
shufflenet_v2_x1_0
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x1_0(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x1_0模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x1_0模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x1_0
24+
25+
# build model
26+
model = shufflenet_v2_x1_0()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x1_0(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x1_5:
2+
3+
shufflenet_v2_x1_5
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x1_5(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x1_5模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x1_5模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x1_5
24+
25+
# build model
26+
model = shufflenet_v2_x1_5()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x1_5(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _cn_api_paddle_vision_models_shufflenet_v2_x2_0:
2+
3+
shufflenet_v2_x2_0
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.shufflenet_v2_x2_0(pretrained=False, **kwargs)
7+
8+
shufflenet_v2_x2_0模型,来自论文 `"ShuffleNet V2: Practical Guidelines for Ecient CNN Architecture Design" <https://arxiv.org/pdf/1807.11164.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
shufflenet_v2_x2_0模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import shufflenet_v2_x2_0
24+
25+
# build model
26+
model = shufflenet_v2_x2_0()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = shufflenet_v2_x2_0(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 224, 224])
32+
out = model(x)
33+
34+
print(out.shape)

0 commit comments

Comments
 (0)