-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Norm op support 2-axis #26492
Norm op support 2-axis #26492
Conversation
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
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
python/paddle/tensor/linalg.py
Outdated
@@ -171,7 +172,7 @@ def __check_input(x, y): | |||
return out | |||
|
|||
|
|||
def norm(input, p='fro', axis=None, keepdim=False, out=None, name=None): | |||
def norm(x, p='fro', axis=None, keepdim=False, out=None, name=None): |
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.
去掉out参数
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.
去掉out参数
已去掉out参数
python/paddle/tensor/linalg.py
Outdated
@@ -180,14 +181,15 @@ def norm(input, p='fro', axis=None, keepdim=False, out=None, name=None): | |||
or 2-norm, and in general the p-norm for p > 0) of a given tensor. | |||
|
|||
Args: | |||
input (Variable): The input tensor could be N-D tensor, and the input data | |||
x (Variable): The input tensor could be N-D tensor, and the input data |
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.
x (Tensor)
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.
修改为x (Tensor)
python/paddle/tensor/linalg.py
Outdated
@@ -180,14 +181,15 @@ def norm(input, p='fro', axis=None, keepdim=False, out=None, name=None): | |||
or 2-norm, and in general the p-norm for p > 0) of a given tensor. | |||
|
|||
Args: | |||
input (Variable): The input tensor could be N-D tensor, and the input data | |||
x (Variable): The input tensor could be N-D tensor, and the input data | |||
type could be float32 or float64. | |||
p (float|string, optional): Order of the norm. Supported values are `fro`, `1`, `2`, |
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.
增加'0'
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.
注释中增加‘0’
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
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
todo:doc 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
PR types
Function optimization
PR changes
OPs
Describe