未验证 提交 773ee87c 编写于 作者: I InsaneOnion 提交者: GitHub

Fixed a mismatch between Chinese and English documents for the CrossEntropyLoss #50424 (#56469)

* Fixed a mismatch between Chinese and English documents for the CrossEntropyLoss #50424

* Update python/paddle/nn/layer/loss.py
Co-authored-by: NNyakku Shigure <sigure.qaq@gmail.com>

* Update python/paddle/nn/layer/loss.py
Co-authored-by: NNyakku Shigure <sigure.qaq@gmail.com>

* update fix

* update fix

* Uniform Context Format

---------
Co-authored-by: NNyakku Shigure <sigure.qaq@gmail.com>
上级 2a5adc5a
...@@ -231,7 +231,7 @@ class CrossEntropyLoss(Layer): ...@@ -231,7 +231,7 @@ class CrossEntropyLoss(Layer):
where, N is the number of samples and C is the number of categories. where, N is the number of samples and C is the number of categories.
2.3.2. If the 'weight' parameter is not 'None', the weighted average value of the previous result will be returned 2.3.2. If the ``weight`` parameter is ``None`` , the weighted average value of the previous result will be returned
1. Hard labels (soft_label = False) 1. Hard labels (soft_label = False)
...@@ -302,6 +302,7 @@ class CrossEntropyLoss(Layer): ...@@ -302,6 +302,7 @@ class CrossEntropyLoss(Layer):
Examples: Examples:
.. code-block:: python .. code-block:: python
:name: code-example1
>>> # hard labels >>> # hard labels
>>> import paddle >>> import paddle
...@@ -321,6 +322,7 @@ class CrossEntropyLoss(Layer): ...@@ -321,6 +322,7 @@ class CrossEntropyLoss(Layer):
5.33697682) 5.33697682)
.. code-block:: python .. code-block:: python
:name: code-example2
>>> # soft labels >>> # soft labels
>>> import paddle >>> import paddle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册