-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
Thank @haojin2 for guidance and reviewing! |
a23120e
to
07d7a94
Compare
@@ -59,6 +59,222 @@ void NumpyTranspose(const nnvm::NodeAttrs& attrs, | |||
} | |||
} | |||
|
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.
Seems like you're re-using most of the existing SplitOpForward and SplitOpBackward, maybe you could refactor the existing code to expose common SplitOpForwardImpl and SplitOpBackwardImpl and call these functions from here instead of copying the code over.
@@ -464,5 +464,44 @@ NNVM_REGISTER_OP(_np_squeeze) | |||
.add_argument("a", "NDArray-or-Symbol[]", "data to squeeze") | |||
.add_arguments(SqueezeParam::__FIELDS__()); | |||
|
|||
NNVM_REGISTER_OP(_npi_hsplit) | |||
.add_alias("_npi_hsplit") |
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.
If you already registered it as _npi_hsplit
then you do not need an extra _npi_hsplit
alias
.add_alias("_npi_hsplit") | ||
.describe(R"code(Splits an array along a particular axis= 1 into multiple sub-arrays. | ||
|
||
`squeeze_axis=True` removes the axis with length 1 from the shapes of the output arrays. |
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.
No need for .describe()
here as this is an internal operator.
Description
numpy hsplit
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
@haojin2