-
Notifications
You must be signed in to change notification settings - Fork 39
[0-size Tensor No.203] Add 0-size Tensor support for paddle.nn.functional.multi_margin_loss #341
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
Conversation
|
@co63oc numpy error 代表配置初始化时失败。这五个看上去也是错误配置,直接删去即可~ |
|
已修改删除 @cangtianhuang |
|
帮忙把这里面的也一齐删掉吧!这些配置应该都是无效的 |
已删除 |
cangtianhuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
该配置在 apitest 中能够正常拦截,但是直接运行会抛出 cuda700 错误: 这是对用户不友好的行为,co 师傅可以尝试向 paddle 库中提出 issue,或者直接提交 pr 尝试修复一下😉~ |
|
|
是的,这个问题可以记录一下,那这个 pr 可以先合入,因为 torch 也不支持 0size: import torch
# paddle.nn.functional.multi_margin_loss(Tensor([5, 0],"float64"), Tensor([5],"int64"), p=1, margin=1.0, weight=None, reduction="mean", name=None, )
input = torch.zeros([5, 0], dtype=torch.float64)
target = torch.ones([5], dtype=torch.int64)
result = torch.nn.functional.multi_margin_loss(input, target, p=1, margin=1.0, weight=None, reduction="mean")
print(result) |
好的 |





paddle.nn.functional.multi_margin_loss 测试都为numpy error,是否迁移配置到其他文件

配置 report/0size_tensor_gpu/error_config.txt
report/0size_tensor_cpu/error_config.txt