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 5th No.43】API转换21-41 #320

Merged
merged 6 commits into from
Nov 6, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Oct 31, 2023

PR Docs

https://github.com/PaddlePaddle/community/blob/master/hackathon/hackathon_5th/%E3%80%90PaddlePaddle%20Hackathon%205th%E3%80%91%E5%BC%80%E6%BA%90%E8%B4%A1%E7%8C%AE%E4%B8%AA%E4%BA%BA%E6%8C%91%E6%88%98%E8%B5%9B%E6%A1%86%E6%9E%B6%E5%BC%80%E5%8F%91%E4%BB%BB%E5%8A%A1%E5%90%88%E9%9B%86.md#no43%E4%B8%BApaddle%E4%BB%A3%E7%A0%81%E8%BD%AC%E6%8D%A2%E5%B7%A5%E5%85%B7%E6%96%B0%E5%A2%9Eapi%E8%BD%AC%E6%8D%A2%E8%A7%84%E5%88%99
API转换21-41

文档PR PaddlePaddle/docs#6280

paddle.nn.CTCLoss torch和paddle结果不一致,文档说明对输入有softmax计算
https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/api/paddle/nn/CTCLoss_cn.html#ctcloss
image

PR APIs

21	torch.broadcast_tensors	paddle.broadcast_tensors	已有文档验证无误
22	torch.broadcast_shapes	paddle.broadcast_shape	已有文档验证无误
23	torch.can_cast		功能缺失
24	torch.utils.data.DataLoader	paddle.io.DataLoader	已有文档验证无误
25	torch.nn.Threshold	paddle.nn.ThresholdedReLU	已有文档和单测,paddle不支持 value 参数,value参数在torch中为必填
26	torch.nn.functional.threshold	paddle.nn.functional.thresholded_relu	已有文档和单测,paddle不支持 value 参数,value参数在torch中为必填
27	torch.nn.Transformer	paddle.nn.Transformer	已有文档验证无误
28	torch.nn.TransformerEncoder	paddle.nn.TransformerEncoder	已有文档验证无误
29	torch.nn.TransformerEncoderLayer	paddle.nn.TransformerEncoderLayer	已有文档验证无误
30	torch.iinfo	paddle.iinfo		增加文档和单测
31	torch.finfo	paddle.finfo	增加文档和单测
32	torch.nn.CTCLoss	paddle.nn.CTCLoss	paddle, torch计算结果不一致,不确定是否设置功能缺失
33	torch.nn.functional.ctc_loss	paddle.nn.functional.ctc_loss	同 torch.nn.CTCLoss
34	torch.nn.PoissonNLLLoss	paddle.nn.PoissonNLLLoss		文档中eps参数名修改epsilon
35	torch.nn.GaussianNLLLoss	paddle.nn.GaussianNLLLoss		已有文档验证无误
36	torch.nn.MultiLabelMarginLoss			功能缺失,文档有误paddle.nn.MultiLabelSoftMarginLoss不能匹配
37	torch.nn.functional.multilabel_margin_loss	paddle.nn.functional.multi_label_soft_margin_loss	同 torch.nn.MultiLabelMarginLoss
38	torch.nn.SmoothL1Loss	paddle.nn.SmoothL1Loss	beta参数不为1.0时不支持,paddle.nn.SmoothL1Loss实际是对应torch.nn.HuberLoss
39	torch.nn.MultiLabelSoftMarginLoss	paddle.nn.MultiLabelSoftMarginLoss	已有文档验证无误
40	torch.nn.MultiMarginLoss	paddle.nn.MultiMarginLoss		已有文档验证无误
41	torch.nn.functional.triplet_margin_loss	paddle.nn.functional.triplet_margin_loss	已有文档验证无误

@co63oc
Copy link
Contributor Author

co63oc commented Oct 31, 2023

image
CI test_iinfo.py调用paddle_aux失败,本地测试可以
convert_from_type 定义
image

tests/test_finfo.py Outdated Show resolved Hide resolved
paconvert/api_matcher.py Outdated Show resolved Hide resolved
paconvert/api_matcher.py Show resolved Hide resolved
paconvert/api_matcher.py Show resolved Hide resolved
paconvert/api_matcher.py Outdated Show resolved Hide resolved
tests/test_nn_CTCLoss.py Show resolved Hide resolved
paconvert/api_mapping.json Outdated Show resolved Hide resolved
paconvert/api_mapping.json Outdated Show resolved Hide resolved
paconvert/api_mapping.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

CTCLoss的缺失文档标注了吗

paconvert/api_matcher.py Show resolved Hide resolved
paconvert/api_matcher.py Outdated Show resolved Hide resolved
@co63oc
Copy link
Contributor Author

co63oc commented Nov 3, 2023

CTCLoss的缺失文档标注了吗

文档PR里已修改 https://github.com/PaddlePaddle/docs/pull/6280/files
image

import torch
x = (2,)
y = (3, 1)
result = torch.broadcast_shapes(x, y, (1, 1, 2))
Copy link
Collaborator

Choose a reason for hiding this comment

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

后面可以补一个可变参数,*shapes的测试case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已增加 PR #325

@zhwesky2010 zhwesky2010 merged commit 204aadd into PaddlePaddle:master Nov 6, 2023
@co63oc co63oc deleted the group2 branch November 16, 2023 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants