[Docs] Fix inline backticks in loss CN docs batch 2#7866
Closed
ghost wants to merge 2 commits into
Closed
Conversation
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7866.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
📚 本次 PR 文档预览链接(点击展开)
|
ooooo-create
approved these changes
Mar 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 属于 PaddlePaddle 中文 API 文档(loss 相关)格式修复批次,主要目的是将中文 .rst 文档中不规范的 inline 单反引号替换为 Sphinx/RST 更安全一致的双反引号 ...,避免被解析为 role/链接并提升渲染稳定性。
Changes:
- 批量将 loss 相关中文 API 文档中的 inline
...修正为...(参数名、取值、shape 里的*等) - 保持 math role(
:math:)、引用(:ref:)和链接不被破坏 - 覆盖多个 loss 文档文件(共 21 个)做一致性修复
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/api/paddle/nn/TripletMarginWithDistanceLoss_cn.rst | 修复 inline backticks(如 input/* 等) |
| docs/api/paddle/nn/TripletMarginLoss_cn.rst | 修复 inline backticks(如 input/* 等) |
| docs/api/paddle/nn/SoftMarginLoss_cn.rst | 修复 inline backticks(如 reduction/* 等) |
| docs/api/paddle/nn/SmoothL1Loss_cn.rst | 修复 inline backticks(如 sum/mini-batch/Tensor 等) |
| docs/api/paddle/nn/PoissonNLLLoss_cn.rst | 修复 inline backticks(如 log_input/epsilon 等) |
| docs/api/paddle/nn/NLLLoss_cn.rst | 修复 inline backticks(如 weight/reduction/Tensor 等) |
| docs/api/paddle/nn/MultiMarginLoss_cn.rst | 修复 inline backticks(如 input/weight 等) |
| docs/api/paddle/nn/MultiLabelSoftMarginLoss_cn.rst | 修复 inline backticks(如 reduction/* 等) |
| docs/api/paddle/nn/MultiLabelMarginLoss_cn.rst | 修复 inline backticks(如 input/label 等) |
| docs/api/paddle/nn/MarginRankingLoss_cn.rst | 修复 inline backticks(如 reduction/margin_rank_loss/* 等) |
| docs/api/paddle/nn/MSELoss_cn.rst | 修复 inline backticks(如 reduction 取值说明) |
| docs/api/paddle/nn/L1Loss_cn.rst | 修复 inline backticks(如 reduction/L1Loss/* 等) |
| docs/api/paddle/nn/KLDivLoss_cn.rst | 修复 inline backticks(如 KLDivLoss/reduction 等) |
| docs/api/paddle/nn/HingeEmbeddingLoss_cn.rst | 修复 inline backticks(如 margin/hinge embedding loss/* 等) |
| docs/api/paddle/nn/HSigmoidLoss_cn.rst | 修复 inline backticks(如 bias_attr/hsigmoid loss 等) |
| docs/api/paddle/nn/GaussianNLLLoss_cn.rst | 修复 inline backticks(如 GaussianNLLLoss/reduction/shape 表达等) |
| docs/api/paddle/nn/CrossEntropyLoss_cn.rst | 修复 inline backticks(如 None/reduction/Tensor/C 等) |
| docs/api/paddle/nn/CosineEmbeddingLoss_cn.rst | 修复 inline backticks(如 CosineEmbeddingLoss/margin/reduction 等) |
| docs/api/paddle/nn/CTCLoss_cn.rst | 修复 inline backticks(如 ctc loss) |
| docs/api/paddle/nn/BCEWithLogitsLoss_cn.rst | 修复 inline backticks(如 logit/reduce/sigmoid 等) |
| docs/api/paddle/nn/BCELoss_cn.rst | 修复 inline backticks(如 reduction/weight/* 等) |
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| 其中 `epsilon` 是 ``True`` 时使用的常数小量,使得 loss 计算过程中不会导致对 0 求对数情况的出现。 | ||
| 当 `log_input` 设置为 `False` 时,损失函数的数学计算公式为: | ||
| 其中 ``epsilon`` 是 ``True`` 时使用的常数小量,使得 loss 计算过程中不会导致对 0 求对数情况的出现。 |
| 可用于创建一个 BCEWithLogitsLoss 的可调用类,计算输入的预测值 ``logit`` 和标签 ``label`` 间的 ``binary cross entropy with logits loss`` 损失。 | ||
|
|
||
| 计算方式结合了 `sigmoid` 操作和 :ref:`cn_api_paddle_nn_BCELoss` 操作。或者,我们也可以认为计算方式是 ``sigmoid_cross_entrop_with_logits`` 和一些 `reduce` 操作的组合。 | ||
| 计算方式结合了 ``sigmoid`` 操作和 :ref:`cn_api_paddle_nn_BCELoss` 操作。或者,我们也可以认为计算方式是 ``sigmoid_cross_entrop_with_logits`` 和一些 ``reduce`` 操作的组合。 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test