-
Notifications
You must be signed in to change notification settings - Fork 274
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 4th No.11】 为 paddle 新增 paddle.distribution.Geometric 分布 #376
Conversation
@luotao1 还有一个,多谢多谢! |
|
||
`Geometric distribution` 应用条件:进行一系列独立试验,每一次试验活成功或失败,每一次试验的成功概率相同,即:为了取得第一次成功,需要进行多少次试验。 | ||
|
||
目前 Paddle 框架中没有继承 Geometric 分布。所以此任务的目标是在 Paddle 框架中,基于现有概率分布方案,在其基础上进行扩展,新增 Geometric API,API 的调用路径为: `paddle.distribution.Geometric`。 |
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.
没有实现
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.
收到!
```python | ||
#probs: the probability of sampling 1. Must be in range (0, 1] | ||
#logits:the log-odds of sampling 1. | ||
paddle.distribution.geometric.Geometric(probs, logits) |
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.
这两个参数是二选一,还是必须都传;我理解是二选一,目前Paddle只需要支持probs就行;logits如果有兴趣可以所有分布统一支持
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.
这两个参数是二选一,还是必须都传;我理解是二选一,目前Paddle只需要支持probs就行;logits如果有兴趣可以所有分布统一支持
- 确实是二选一,是我没有表达清楚。
- logits 的实现确实是需要额外的处理。后面能力允许的话再尝试着如何让所有分布都支持 logits。
@cxxly 您上面提出的修改意见都已进行修改,劳烦抽空再给review一下,感谢! |
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
rfc : Geometric Distribution