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. 165-180 #190

Merged
merged 2 commits into from
Jul 24, 2023
Merged

转换规则 No. 165-180 #190

merged 2 commits into from
Jul 24, 2023

Conversation

co63oc
Copy link
Contributor

@co63oc co63oc commented Jul 21, 2023

PR Docs

#112

映射文档 PaddlePaddle/docs#6044

PR APIs

165 torch.distributions.exp_family.ExponentialFamily 抽象基类
166 torch.distributions.bernoulli.Bernoulli
167 torch.distributions.binomial.Binomial API不支持
168 torch.distributions.categorical.Categorical
169 torch.distributions.cauchy.Cauchy
170 torch.distributions.continuous_bernoulli.ContinuousBernoulli API不支持
171 torch.distributions.dirichlet.Dirichlet
172 torch.distributions.exponential.Exponential API不支持
173 torch.distributions.geometric.Geometric
174 torch.distributions.gumbel.Gumbel 
175 torch.distributions.independent.Independent
176 torch.distributions.laplace.Laplace
177 torch.distributions.log_normal.LogNormal
178 torch.distributions.multinomial.Multinomial
179 torch.distributions.normal.Normal
180 torch.distributions.one_hot_categorical.OneHotCategorical  API不支持

@co63oc co63oc changed the title 转换规则 No. 165 转换规则 No. 165-180 Jul 22, 2023
@paddle-bot paddle-bot bot added the contributor External developers label Jul 22, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jul 24, 2023
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.

logits这个参数删掉是否影响计算结果

"validate_args"
],
"kwargs_change": {
"logits": "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个直接删除,是不是会影响计算结果

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改unsupport_args

"validate_args"
],
"kwargs_change": {
"probs": "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个直接删除,是不是会影响计算结果

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改unsupport_args

"validate_args"
],
"kwargs_change": {
"logits": "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个直接删除,是不是会影响计算结果

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改unsupport_args

"""
import torch
m = torch.distributions.exp_family.ExponentialFamily(batch_shape=torch.Size([1]), event_shape=torch.Size([2]), validate_args=False)
result = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里是不是可以改写comare函数,修改下对比方式,比如isinstance(cls, base)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

pytorch_code = textwrap.dedent(
"""
import torch
m = torch.distributions.exp_family.ExponentialFamily(batch_shape=torch.Size([1]), event_shape=torch.Size([2]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里是不是可以改写comare函数,修改下对比方式,比如isinstance(cls, base)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

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.

result=None这里可以加强下对比,重写下compare函数

"""
import torch
m = torch.distributions.exp_family.ExponentialFamily()
result = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里可以加强下对比,重写下compare函数

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

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 0d36242 into PaddlePaddle:master Jul 24, 2023
@co63oc co63oc deleted the api165 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants