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

【PaddlePaddle Hackathon 】No.17 add docs for API CosineEmbeddingLoss #4737

Merged
merged 5 commits into from
Jun 8, 2022

Conversation

Patrick-Star125
Copy link
Contributor

@Patrick-Star125 Patrick-Star125 commented May 10, 2022

增加nn.CosineEmbeddingLoss和nn.functional.cosine_embedding_loss的中文文档。

该算子的实现PR为PaddlePaddle/Paddle#41680

PADDLEPADDLE_PR=41680

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

还需要在 paddle/nn 目录下的 Overview 添加这两个API的索引


返回
:::::::::
``Tensor``,输入 ``input`` 和标签 ``label`` 间的 `CosineEmbeddingLoss` 损失。如果 `reduction` 是 ``'none'``, 则输出Loss的维度为 [N], 与输入 ``input`` 相同。如果 `reduction` 是 ``'mean'`` 或 ``'sum'``, 则输出Loss的维度为 [1]。
Copy link
Collaborator

Choose a reason for hiding this comment

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

input 需要明确是 input1 还是 input 2 还是input1 和 input2;英文同理

代码示例
:::::::::

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

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

代码示例
:::::::::

.. code-block:: python
Copy link
Collaborator

Choose a reason for hiding this comment

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

同下 使用 COPY-FROM

@Patrick-Star125
Copy link
Contributor Author

已修改

@TCChenlong TCChenlong merged commit 3d0fb04 into PaddlePaddle:develop Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants