Skip to content

Commit 0f908ff

Browse files
authored
[PaddlePaddle Hackathon] add GoogLeNet zh doc (#3914)
* add googlenet * update API name * sync with en doc * add googlenet into overview * Create GoogLeNet_cn.rst * Update GoogLeNet_cn.rst * Update Overview * add parameter with_pool * fix googlenet out shape * resolve conflict * trigger CI * trigger CI * trigger CI
1 parent 1652621 commit 0f908ff

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

docs/api/paddle/vision/Overview_cn.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下:
6969
" :ref:`densenet264 <cn_api_paddle_vision_models_densenet264>` ", "264层的DenseNet模型"
7070
" :ref:`InceptionV3 <cn_api_paddle_vision_models_InceptionV3>` ", "InceptionV3模型"
7171
" :ref:`inception_v3 <cn_api_paddle_vision_models_inception_v3>` ", "InceptionV3模型"
72+
" :ref:`GoogLeNet <cn_api_paddle_vision_models_GoogLeNet>` ", "GoogLeNet模型"
73+
" :ref:`googlenet <cn_api_paddle_vision_models_googlenet>` ", "GoogLeNet模型"
74+
7275

7376
.. _about_ops:
7477

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

0 commit comments

Comments
 (0)