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.
fix paddle.vision.models.* cn docs (PaddlePaddle#4936)
* begin a pr (just a placeholder) * add a blank line * add space between cn and en char * "sing `COPY-FROM` * add a blank line between h2 and p * refine returns * fix the case of proper * refine parameter `pretrained` * add parameter `kwargs` * refine parameter `num_classes` * missing parameter `with_pool` * CRLF -> LF @Ainavo 出来挨打,为什么你写的全是 CRLF 的…… * add some missing api labels * `默认值:` -> `默认值为 ` * refine returns * :math:\`0.0\`
- Loading branch information
Showing
52 changed files
with
572 additions
and
393 deletions.
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 |
---|---|---|
@@ -1,22 +1,24 @@ | ||
.. _cn_api_paddle_vision_models_alexnet: | ||
.. _cn_api_paddle_vision_models_AlexNet: | ||
|
||
alexnet | ||
AlexNet | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.alexnet(pretrained=False, **kwargs) | ||
.. py:function:: paddle.vision.models.AlexNet(num_classes=1000) | ||
AlexNet模型,来自论文 `"ImageNet Classification with Deep Convolutional Neural Networks" <https://papers.nips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf>`_ 。 | ||
AlexNet 模型,来自论文 `"ImageNet Classification with Deep Convolutional Neural Networks" <https://papers.nips.cc/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
- **\*\*kwargs** (可选) - 附加的关键字参数,具体可选参数请参见 :ref:`AlexNet <cn_api_paddle_vision_models_AlexNet>`。 | ||
|
||
- **num_classes** (int,可选) - 最后一个全连接层输出的维度。如果该值小于等于 0,则不定义最后一个全连接层。默认值为 1000。 | ||
|
||
返回 | ||
::::::::: | ||
alexnet模型,Layer的实例。 | ||
|
||
:ref:`cn_api_fluid_dygraph_Layer`,AlexNet 模型实例。 | ||
|
||
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.vision.models.alexnet:code-example | ||
COPY-FROM: paddle.vision.models.AlexNet |
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 |
---|---|---|
@@ -1,34 +1,25 @@ | ||
.. _cn_api_paddle_vision_models_googlenet: | ||
.. _cn_api_paddle_vision_models_GoogLeNet: | ||
|
||
googlenet | ||
GoogLeNet | ||
------------------------------- | ||
|
||
.. py:function:: paddle.vision.models.googlenet(pretrained=False, **kwargs) | ||
.. py:function:: paddle.vision.models.googlenet(num_classes=1000, with_pool=True) | ||
GoogLeNet(Inception v1)模型,来自论文 `"Going Deeper with Convolutions" <https://arxiv.org/pdf/1409.4842.pdf>`_ 。 | ||
GoogLeNet(Inception v1)模型,来自论文 `"Going Deeper with Convolutions" <https://arxiv.org/pdf/1409.4842.pdf>`_ 。 | ||
|
||
参数 | ||
::::::::: | ||
- **pretrained** (bool,可选) - 是否加载在imagenet数据集上的预训练权重。默认值:False。 | ||
|
||
- **num_classes** (int,可选) - 最后一个全连接层输出的维度。如果该值小于等于 0,则不定义最后一个全连接层。默认值为 1000。 | ||
- **with_pool** (bool,可选) - 是否定义最后一个全连接层之前的池化层。默认值为 True。 | ||
|
||
返回 | ||
::::::::: | ||
GoogLeNet模型,Layer的实例。 | ||
|
||
:ref:`cn_api_fluid_dygraph_Layer`,GoogLeNet(Inception v1)模型实例。 | ||
|
||
代码示例 | ||
::::::::: | ||
.. code-block:: python | ||
import paddle | ||
from paddle.vision.models import googlenet | ||
# build model | ||
model = googlenet() | ||
# build model and load imagenet pretrained weight | ||
# model = googlenet(pretrained=True) | ||
x = paddle.rand([1, 3, 224, 224]) | ||
out, out1, out2 = model(x) | ||
|
||
print(out.shape) | ||
COPY-FROM: paddle.vision.models.GoogLeNet |
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
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
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
Oops, something went wrong.