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

【Hackathon No.11】为 Paddle 新增 multi_margin_loss API #171

Merged
merged 5 commits into from Aug 8, 2022

Conversation

yangguohao
Copy link
Contributor

add rfc of MultiMarginLoss

@paddle-bot
Copy link

paddle-bot bot commented Jul 7, 2022

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@Ligoml
Copy link
Contributor

Ligoml commented Jul 8, 2022

你好,请先完成黑客松第二期的任务再参与第三期哦~ PaddlePaddle/Paddle#42364

@yangguohao yangguohao changed the title 【Hackathon No.11】 【Hackathon No.11】为 Paddle 新增 multi_margin_loss API Jul 30, 2022
name:str=None,
) -> Tensor:`
- input:Tensor, 维度为[batchsize,num_classes]
- label:Tensor, 维度为[batchsize,1]

Choose a reason for hiding this comment

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

不建议有这种形状要求。既然知道第二个维度 size 一定是 1, 那就直接不要这个维度,直接 (batch_size,) 即可。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

) -> Tensor:`
- input:Tensor, 维度为[batchsize,num_classes]
- label:Tensor, 维度为[batchsize,1]
- weight: Optional[Tensor],维度为[num_classes,1]

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

- input:Tensor, 维度为[batchsize,num_classes]
- label:Tensor, 维度为[batchsize,1]
- weight: Optional[Tensor],维度为[num_classes,1]
- reduction:str,'None','mean','sum

Choose a reason for hiding this comment

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

建议统一,都用小写字符串。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

Copy link

@iclementine iclementine left a comment

Choose a reason for hiding this comment

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

关于输入的形状和参数,请作为参考。

Copy link

@iclementine iclementine left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit 51cb35b into PaddlePaddle:master Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants