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

Refine bernoulli and unsqueeze op #26842

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

zhiqiu
Copy link
Contributor

@zhiqiu zhiqiu commented Aug 31, 2020

PR types

New features

PR changes

OPs

Describe

  • add check for bernoulli cuda kernel

  • register bool for unsqueeze kernel

  • refine doc of paddle.stack

@paddle-bot-old
Copy link

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

jzhang533
jzhang533 previously approved these changes Sep 1, 2020
Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

// NOTE(zhiqiu): currently, PADDLE_ENFORCE in cuda kernel may print several
// lines of error messages if, and it should be refined.
PADDLE_ENFORCE(p >= 0.0 && p <= 1.0,
"The probability should >=0 and <= 1, but got %f", p);
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是should >= 0,下面是should be <= 1,要不要统一下?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thx

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

@zhiqiu zhiqiu merged commit 60ffc22 into PaddlePaddle:develop Sep 1, 2020
zhiqiu added a commit to zhiqiu/Paddle that referenced this pull request Sep 1, 2020
* add check for bernoulli and register bool for unsqueeze

* follow comments
zhiqiu added a commit that referenced this pull request Sep 2, 2020
* add check for bernoulli and register bool for unsqueeze

* follow comments
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.

None yet

3 participants