Skip to content

Conversation

Echo-Nie
Copy link
Contributor

@Echo-Nie Echo-Nie commented Apr 29, 2025

Fix

activation.rst
activation_en.rst

Description

Repair the document according to Paddle 1.8 与 Paddle 2.0 API 映射表

Deprecated APIs New APIs Rename
:ref:cn_api_fluid_layers_relu :ref:cn_api_paddle_nn_functional_relu
:ref:cn_api_fluid_layers_tanh :ref:cn_api_paddle_nn_functional_tanh paddle_tanh
:ref:cn_api_fluid_layers_sigmoid :ref:cn_api_paddle_nn_functional_sigmoid cn:not changed en:paddle_tensor_sigmoid
:ref:cn_api_fluid_layers_elu :ref:cn_api_paddle_nn_functional_elu
:ref:cn_api_fluid_layers_relu6 :ref:cn_api_paddle_nn_functional_relu6
:ref:cn_api_fluid_layers_pow :ref:cn_api_paddle_pow
:ref:cn_api_fluid_layers_stanh :ref:cn_api_paddle_stanh
:ref:cn_api_fluid_layers_hard_sigmoid :ref:cn_api_paddle_nn_functional_hard_sigmoid nn_functional_hard_sigmoid
:ref:cn_api_fluid_layers_swish :ref:cn_api_paddle_nn_functional_swish
:ref:cn_api_fluid_layers_prelu :ref:cn_api_paddle_nn_functional_prelu
:ref:cn_api_fluid_layers_leaky_relu :ref:cn_api_paddle_nn_functional_leaky_relu
:ref:cn_api_fluid_layers_thresholded_relu :ref:cn_api_paddle_nn_functional_thresholded_relu
:ref:cn_api_fluid_layers_maxout :ref:cn_api_paddle_nn_functional_maxout
:ref:cn_api_fluid_layers_logsigmoid :ref:cn_api_paddle_nn_functional_logsigmoid nn_functional_log_sigmoid
:ref:cn_api_fluid_layers_hard_shrink :ref:cn_api_paddle_nn_functional_hard_shrink nn_functional_hardshrink
:ref:cn_api_fluid_layers_softsign :ref:cn_api_paddle_nn_functional_softsign
:ref:cn_api_fluid_layers_softplus :ref:cn_api_paddle_nn_functional_softplus
:ref:cn_api_fluid_layers_tanh_shrink :ref:cn_api_paddle_nn_functional_tanh_shrink nn_functional_tanhshrink
:ref:cn_api_fluid_layers_softshrink :ref:cn_api_paddle_nn_functional_softshrink
:ref:cn_api_fluid_layers_exp :ref:cn_api_paddle_exp

The following APIs have been removed

  • :ref:cn_api_fluid_layers_brelu
  • :ref:cn_api_fluid_layers_soft_relu

The following APIs have been renamed

The only difference from before is that the underscores have been removed:

  • cn_api_paddle_nn_functional_hard_sigmoid has been changed to hardsigmoid
  • cn_api_paddle_nn_functional_hard_shrink has been changed to hardshrink
  • cn_api_paddle_nn_functional_tanh_shrink has been changed to tanhshrink
  • cn_api_paddle_nn_functional_logsigmoid has been changed to log_sigmoid

issue: #71203
@DrRyanHuang

Copy link

paddle-bot bot commented Apr 29, 2025

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7297.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@Echo-Nie Echo-Nie changed the title [Docathon][Update Doc No.31] update the api path [Docathon][Update Doc No.31] update activation Apr 29, 2025
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Apr 30, 2025

.. code-block:: python

conv2d = fluid.layers.conv2d(input=data, num_filters=2, filter_size=3)
relu1 = fluid.layers.relu(conv2d)
conv2d = nn.functional.conv2d(input=data, num_filters=2, filter_size=3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nn.functional.conv2d 按照其签名修改一下参数:

paddle.nn.functional.conv2d(x, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, data_format='NCHW', name=None)

英文版也改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Echo-Nie Echo-Nie requested a review from DrRyanHuang May 8, 2025 08:15
@Echo-Nie
Copy link
Contributor Author

Echo-Nie commented May 8, 2025

@DrRyanHuang pls review

@Echo-Nie Echo-Nie changed the title [Docathon][Update Doc No.31] update activation [Docathon][Update Doc No.21] update activation May 8, 2025
Copy link
Collaborator

@DrRyanHuang DrRyanHuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DrRyanHuang DrRyanHuang merged commit de02280 into PaddlePaddle:develop May 9, 2025
2 checks passed
@Echo-Nie Echo-Nie deleted the No21PaddleDoc branch May 9, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants