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

Update paddle.clamp #25906

Merged
merged 9 commits into from
Aug 21, 2020
Merged

Update paddle.clamp #25906

merged 9 commits into from
Aug 21, 2020

Conversation

willthefrog
Copy link
Contributor

@willthefrog willthefrog commented Aug 3, 2020

PR types

Breaking changes

PR changes

APIs

Describe

rename to paddle.clip
add fast path for dygraph mode
remove out
rename input -> x
update doc sample
also fix cosine_similarity conflict

@paddle-bot-old
Copy link

paddle-bot-old bot commented Aug 3, 2020

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

@willthefrog willthefrog force-pushed the paddle.clip branch 8 times, most recently from 7f1cfd2 to 665e771 Compare August 10, 2020 06:26
@willthefrog willthefrog force-pushed the paddle.clip branch 2 times, most recently from a1ea928 to c4a66ff Compare August 10, 2020 10:37
a resulting tensor as the following equation:

.. math::

Out = MIN(MAX(x, min), max)

Args:
input (Variable): An input N-D Tensor or LoDTensor
with data type float32, float64.
x (Tensor): An N-D Tensor with data type float32 or float64.
min (float32|Variable): The lower bound with type ``float32`` or a ``Tensor``
Copy link
Contributor

Choose a reason for hiding this comment

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

Variable -> Tensor here as well?

Copy link
Contributor Author

@willthefrog willthefrog Aug 11, 2020

Choose a reason for hiding this comment

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

good catch, done, thanks!

:alias_main: paddle.clamp
:alias: paddle.clamp,paddle.tensor.clamp,paddle.tensor.math.clamp
:alias_main: paddle.clip
:alias: paddle.clip,paddle.tensor.clip,paddle.tensor.math.clip
Copy link
Contributor

Choose a reason for hiding this comment

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

这两行写在docstring里的alias标签是可以去掉的。

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

jzhang533
jzhang533 previously approved these changes Aug 13, 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

kolinwei
kolinwei previously approved these changes Aug 14, 2020
Copy link
Contributor

@kolinwei kolinwei left a comment

Choose a reason for hiding this comment

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

tensor.clamp倍tensor.clip替换,删除相关单测

kolinwei
kolinwei previously approved these changes Aug 20, 2020
zhiqiu
zhiqiu previously approved these changes Aug 20, 2020
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@willthefrog willthefrog force-pushed the paddle.clip branch 2 times, most recently from 2579542 to 2a59b0e Compare August 20, 2020 13:33
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 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

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@willthefrog willthefrog merged commit e662d1e into PaddlePaddle:develop Aug 21, 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.

None yet

6 participants