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】 #114

Merged
merged 5 commits into from May 17, 2022
Merged

Conversation

yangguohao
Copy link
Contributor

add rfc of SoftMarginLoss

@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.

@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.

Comment on lines 76 to 77
input:Tensor, 维度为[batchsize,num_classes]
label:Tensor, 维度为[batchsize,num_classes]
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. input 和 label 的维度设置 [batch_size,dim] 是基于什么考虑呢?
  2. input 和 label 接受的 data_type 是什么样子的呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

Comment on lines 77 to 78
- input:Tensor, 维度为[N,*],其中N是batch_size, `*` 是任意其他维度。数据类型是float32、float64。
- label:Tensor, 维度为[batchsize,num_classes]维度、数据类型与输入 input 相同。
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的 API 参数设计还存在一些问题:

  1. label 的维度应该与input的维度相同
  2. label 的数值只能为 1 或者 -1
  3. label 需要支持 [int32, int64, float32, float64] 数据类型

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

@yingyibiao yingyibiao merged commit 363951c into PaddlePaddle:master 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.

None yet

4 participants