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

fix test_multinomial #28558

Merged
merged 2 commits into from
Nov 16, 2020
Merged

Conversation

pangyoki
Copy link
Contributor

@pangyoki pangyoki commented Nov 11, 2020

PR types

Others

PR changes

APIs

Describe

fix test_multinomial

  • 单测失败原因:
    随机获取的概率分布中含有0概率,0概率对应的下标在多项分布采样过程中不会被选取。单测会统计采样的数据,概率分布中含有0时,会少了一个维度的数据,导致shape不匹配报错。

  • 解决方法:
    统计采样数据时,设置没有被采样过的种类的采样概率为0。

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 11, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 11, 2020
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 12, 2020
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 12, 2020
@zhiqiu zhiqiu self-requested a review November 16, 2020 06:33
@pangyoki pangyoki merged commit 72e068f into PaddlePaddle:develop Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants