Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix doc bugs #58933

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions python/paddle/nn/functional/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,12 @@ def base_softmax_with_cross_entropy(
is the rank of input :attr:`logits`. Default: -1.

Returns:
``Tensor`` or Tuple of two ``Tensor`` : Return the cross entropy loss if \
`return_softmax` is False, otherwise the tuple \
(loss, softmax), softmax is in the same shape \
with input logits and cross entropy loss is in \
the same shape with input logits except shape \
in dimension :attr:`axis` as 1.
- If `return_softmax` is False, return the cross entropy loss as a ``Tensor``.
The dtype is the same as the input ``logits``. The shape is consistent with ``logits`` except in dimension :attr:`axis` as 1.
- If `return_softmax` is True, return a tuple of two ``Tensor``: the cross entropy loss and the softmax result.
The dtype of the cross entropy loss is the same as the input ``logits``, and the shape is consistent with ``logits``
except in dimension :attr:`axis` as 1. The dtype and shape of the softmax result are the same as the input ``logits``.


Examples:
.. code-block:: python
Expand Down Expand Up @@ -2458,12 +2458,12 @@ def softmax_with_cross_entropy(
is the rank of input :attr:`logits`. Default: -1.

Returns:
``Tensor`` or Tuple of two ``Tensor`` : Return the cross entropy loss if \
`return_softmax` is False, otherwise the tuple \
(loss, softmax), softmax is in the same shape \
with input logits and cross entropy loss is in \
the same shape with input logits except shape \
in dimension :attr:`axis` as 1.
- If `return_softmax` is False, return the cross entropy loss as a ``Tensor``.
The dtype is the same as the input ``logits``. The shape is consistent with ``logits`` except in dimension :attr:`axis` as 1.
- If `return_softmax` is True, return a tuple of two ``Tensor``: the cross entropy loss and the softmax result.
The dtype of the cross entropy loss is the same as the input ``logits``, and the shape is consistent with ``logits``
except in dimension :attr:`axis` as 1. The dtype and shape of the softmax result are the same as the input ``logits``.


Examples:
.. code-block:: python
Expand Down