Skip to content

Commit

Permalink
[PaddlePaddle Hackathon] add InceptionV3 zh doc (PaddlePaddle#3921)
Browse files Browse the repository at this point in the history
* add inception_v3

* sync with en doc

* remove argument config

* add inceptionv3 into overview

* add parameter with_pool

* update inceptionv3 docs
  • Loading branch information
SigureMo authored Oct 28, 2021
1 parent ba19c56 commit 3dc0e76
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/paddle/vision/Overview_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ paddle.vision 目录是飞桨在视觉领域的高层API。具体如下:
" :ref:`vgg13 <cn_api_paddle_vision_models_vgg13>` ", "13层的VGG模型"
" :ref:`vgg16 <cn_api_paddle_vision_models_vgg16>` ", "16层的VGG模型"
" :ref:`vgg19 <cn_api_paddle_vision_models_vgg19>` ", "19层的VGG模型"
" :ref:`InceptionV3 <cn_api_paddle_vision_models_InceptionV3>` ", "InceptionV3模型"
" :ref:`inception_v3 <cn_api_paddle_vision_models_inception_v3>` ", "InceptionV3模型"


.. _about_ops:
Expand Down
31 changes: 31 additions & 0 deletions docs/api/paddle/vision/models/InceptionV3_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. _cn_api_paddle_vision_models_InceptionV3:

InceptionV3
-------------------------------

.. py:class:: paddle.vision.models.InceptionV3(num_classes=1000, with_pool=True)
InceptionV3模型,来自论文 `"Rethinking the Inception Architecture for Computer Vision" <https://arxiv.org/pdf/1512.00567.pdf>`_ 。

参数
:::::::::
- **num_classes** (int, 可选) - 最后一个全连接层输出的维度。如果该值小于0,则不定义最后一个全连接层。默认值:1000。
- **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值:True。

返回
:::::::::
InceptionV3模型,Layer的实例。

代码示例
:::::::::
.. code-block:: python
import paddle
from paddle.vision.models import InceptionV3
inception_v3 = InceptionV3()
x = paddle.rand([1, 3, 299, 299])
out = inception_v3(x)
print(out.shape)
34 changes: 34 additions & 0 deletions docs/api/paddle/vision/models/inception_v3_cn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.. _cn_api_paddle_vision_models_inception_v3:

inception_v3
-------------------------------

.. py:function:: paddle.vision.models.inception_v3(pretrained=False, **kwargs)
InceptionV3模型,来自论文 `"Rethinking the Inception Architecture for Computer Vision" <https://arxiv.org/pdf/1512.00567.pdf>`_ 。

参数
:::::::::
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。

返回
:::::::::
InceptionV3模型,Layer的实例。

代码示例
:::::::::
.. code-block:: python
import paddle
from paddle.vision.models import inception_v3
# build model
model = inception_v3()
# build model and load imagenet pretrained weight
# model = inception_v3(pretrained=True)
x = paddle.rand([1, 3, 299, 299])
out = model(x)
print(out.shape)

0 comments on commit 3dc0e76

Please sign in to comment.