-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add segment apis to paddle.incubate #35759
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
Conversation
Thanks for your contribution! |
|
||
This operator calculate the maximum elements of input `data` which with | ||
the same index in `segment_ids`. | ||
It computes a tensor such that $out_i = \\min_{j} data_{j}$ |
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.
\max
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
# limitations under the License. | ||
|
||
__all__ = [ | ||
'segment_sum', |
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.
这里不用加到__all__列表,这个列表会用来统计公开API,只需要在目标位置加一次就行。
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.
下个PR进行修复 : #35818
PR types
New features
PR changes
APIs
Describe
Add segment apis to paddle.incubate
Segment APIs provide operations (sum, mean, max, min) on certain segment part. Following image demonstrates the process of segment mean. The
segment_ids
divides thedata
into 4 parts, andsegment_mean
calculates the mean of each part.