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.21】add RFC for SoftMarginLoss #101

Closed
wants to merge 4 commits into from

Conversation

BlackWitty
Copy link

No description provided.

@paddle-bot-old
Copy link

你的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.

@CLAassistant
Copy link

CLAassistant commented Apr 12, 2022

CLA assistant check
All committers have signed the CLA.

@paddle-bot-old
Copy link

PR格式检查通过,你的PR将接受Paddle专家以及开源社区的review,请及时关注PR动态。
The format inspection passed. Your PR will be reviewed by experts of Paddle and developers from the open-source community. Stay tuned.

@dingjiaweiww
Copy link
Contributor

请先签署cla噢~

@BlackWitty
Copy link
Author

请先签署cla噢~

已经签署,辛苦CR

Comment on lines +162 to +163
paddle.nn.SoftMarginLoss(size_average=None, reduce=None, reduction='mean') -> Tensor
该函数底层调用padde.nn.functional.soft_margin_loss
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的size_average和reduce参数是否还有必要呢?

Comment on lines +158 to +159
padde.nn.functional.soft_margin_loss(input Tensor[float64 or float32], target Tensor[float64 or float32],size_average [bool optional]默认为true,reduce [bool]作为参数,默认为true, reduction='mean', 'mean' 求平均,'sum'求和,'None', negative, Tensor[float64 or float32],维度为[batch_size,dim]) -> Tensor

Copy link
Contributor

Choose a reason for hiding this comment

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

input 和 target 的维度设置 [batch_size,dim] 是基于什么考虑呢?data_type设置为 float 是基于什么考虑呢?

@TCChenlong TCChenlong closed this May 17, 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.

6 participants