Skip to content

Commit 3dc0e76

Browse files
authored
[PaddlePaddle Hackathon] add InceptionV3 zh doc (#3921)
* add inception_v3 * sync with en doc * remove argument config * add inceptionv3 into overview * add parameter with_pool * update inceptionv3 docs
1 parent ba19c56 commit 3dc0e76

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

docs/api/paddle/vision/Overview_cn.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下:
5454
" :ref:`vgg13 <cn_api_paddle_vision_models_vgg13>` ", "13层的VGG模型"
5555
" :ref:`vgg16 <cn_api_paddle_vision_models_vgg16>` ", "16层的VGG模型"
5656
" :ref:`vgg19 <cn_api_paddle_vision_models_vgg19>` ", "19层的VGG模型"
57+
" :ref:`InceptionV3 <cn_api_paddle_vision_models_InceptionV3>` ", "InceptionV3模型"
58+
" :ref:`inception_v3 <cn_api_paddle_vision_models_inception_v3>` ", "InceptionV3模型"
5759

5860

5961
.. _about_ops:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. _cn_api_paddle_vision_models_InceptionV3:
2+
3+
InceptionV3
4+
-------------------------------
5+
6+
.. py:class:: paddle.vision.models.InceptionV3(num_classes=1000, with_pool=True)
7+
8+
InceptionV3模型,来自论文 `"Rethinking the Inception Architecture for Computer Vision" <https://arxiv.org/pdf/1512.00567.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。
13+
- **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。
14+
15+
返回
16+
:::::::::
17+
InceptionV3模型,Layer的实例。
18+
19+
代码示例
20+
:::::::::
21+
.. code-block:: python
22+
23+
import paddle
24+
from paddle.vision.models import InceptionV3
25+
26+
inception_v3 = InceptionV3()
27+
28+
x = paddle.rand([1, 3, 299, 299])
29+
out = inception_v3(x)
30+
31+
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_inception_v3:
2+
3+
inception_v3
4+
-------------------------------
5+
6+
.. py:function:: paddle.vision.models.inception_v3(pretrained=False, **kwargs)
7+
8+
InceptionV3模型,来自论文 `"Rethinking the Inception Architecture for Computer Vision" <https://arxiv.org/pdf/1512.00567.pdf>`_ 。
9+
10+
参数
11+
:::::::::
12+
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。
13+
14+
返回
15+
:::::::::
16+
InceptionV3模型,Layer的实例。
17+
18+
代码示例
19+
:::::::::
20+
.. code-block:: python
21+
22+
import paddle
23+
from paddle.vision.models import inception_v3
24+
25+
# build model
26+
model = inception_v3()
27+
28+
# build model and load imagenet pretrained weight
29+
# model = inception_v3(pretrained=True)
30+
31+
x = paddle.rand([1, 3, 299, 299])
32+
out = model(x)
33+
34+
print(out.shape)

0 commit comments

Comments
 (0)