未验证 提交 db9088be 编写于 作者: N Nyakku Shigure 提交者: GitHub

update ResNet en docs (#43523)

* add `Returns`

* refine en doc

* refine parameter `pretrained`, test=document_fix
上级 50b4e5ee
......@@ -181,13 +181,16 @@ class ResNet(nn.Layer):
Args:
Block (BasicBlock|BottleneckBlock): block module of model.
depth (int, optional): layers of resnet, Default: 50.
depth (int, optional): layers of ResNet, Default: 50.
width (int, optional): base width per convolution group for each convolution block, Default: 64.
num_classes (int, optional): output dim of last fc layer. If num_classes <=0, last fc layer
will not be defined. Default: 1000.
with_pool (bool, optional): use pool before the last fc layer or not. Default: True.
groups (int, optional): number of groups for each convolution block, Default: 1.
Returns:
ResNet model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -330,7 +333,11 @@ def resnet18(pretrained=False, **kwargs):
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNet 18-layer model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -358,7 +365,11 @@ def resnet34(pretrained=False, **kwargs):
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNet 34-layer model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -386,7 +397,11 @@ def resnet50(pretrained=False, **kwargs):
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNet 50-layer model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -414,7 +429,11 @@ def resnet101(pretrained=False, **kwargs):
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNet 101-layer. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -442,7 +461,11 @@ def resnet152(pretrained=False, **kwargs):
`"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNet 152-layer model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -470,7 +493,11 @@ def resnext50_32x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-50 32x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -500,7 +527,11 @@ def resnext50_64x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-50 64x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -530,7 +561,11 @@ def resnext101_32x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-101 32x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -561,7 +596,11 @@ def resnext101_64x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-101 64x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -592,7 +631,11 @@ def resnext152_32x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-152 32x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -623,7 +666,11 @@ def resnext152_64x4d(pretrained=False, **kwargs):
`"Aggregated Residual Transformations for Deep Neural Networks" <https://arxiv.org/pdf/1611.05431.pdf>`_
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
ResNeXt-152 64x4d model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -654,7 +701,11 @@ def wide_resnet50_2(pretrained=False, **kwargs):
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_.
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
Wide ResNet-50-2 model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......@@ -683,7 +734,11 @@ def wide_resnet101_2(pretrained=False, **kwargs):
`"Wide Residual Networks" <https://arxiv.org/pdf/1605.07146.pdf>`_.
Args:
pretrained (bool, optional): If True, returns a model pre-trained on ImageNet. Default: False.
pretrained (bool, optional): Whether to load pre-trained weights. If True, returns a model pre-trained
on ImageNet. Default: False.
Returns:
Wide ResNet-101-2 model. An instance of :ref:`api_fluid_dygraph_Layer`.
Examples:
.. code-block:: python
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册