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

转换规则 No.272/282/318/324/326 #149

Merged
merged 4 commits into from
Jul 4, 2023
Merged

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Jun 30, 2023

PR Docs

#112

已有文档增加转换规则

282 torch.frexp 已存在测试,取消文件

PR APIs

272 torch.nn.functional.mish
282 torch.frexp
318 torch.special.log_softmax
324 torch.corrcoef
326 torch.Tensor.histogram

@paddle-bot
Copy link

paddle-bot bot commented Jun 30, 2023

Thanks for your contribution!

ROckDog22
ROckDog22 previously approved these changes Jun 30, 2023
@ROckDog22
Copy link
Contributor

解决下冲突

@co63oc co63oc changed the title 转换规则 No.272/282/318 转换规则 No.272/282/318/324/326 Jun 30, 2023
@co63oc
Copy link
Contributor Author

co63oc commented Jun 30, 2023

解决下冲突

已修改

ROckDog22
ROckDog22 previously approved these changes Jun 30, 2023
ROckDog22
ROckDog22 previously approved these changes Jul 3, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 3, 2023
class TensorHistogramMatcher(BaseMatcher):
def generate_code(self, kwargs):
if "range" in kwargs:
r = eval(kwargs["range"])
Copy link
Collaborator

@zhwesky2010 zhwesky2010 Jul 4, 2023

Choose a reason for hiding this comment

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

还是不要在这里执行了,如果range是个变量就会挂,风险比较大,建议在代码里可以直接写成:

kwargs["min"] = "{}[0]".format(kwargs["range"])
kwargs["max"] = "{}[1]".format(kwargs["range"])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改,参数需要转整形增加int()

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.

LGTM

@zhwesky2010 zhwesky2010 merged commit 2b1000d into PaddlePaddle:master Jul 4, 2023
@co63oc co63oc deleted the doc0630 branch August 4, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR status: proposed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants