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
Add a dynamic_partial_sum operator to tensorflow? #7662
Comments
Is there a numpy equivalent function or composition of functions that do
this?
…On Sun, Feb 19, 2017 at 4:24 PM, Andrew Selle ***@***.***> wrote:
@ebrevdo <https://github.com/ebrevdo>, @rmlarsen
<https://github.com/rmlarsen>, what do you two think? What would we call
such an operation. It does seem useful. I've wanted to do this type of
thing once or twice, even.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7662 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABtimxNzOClfnr087AfR8NrJkxeOLF_7ks5reN02gaJpZM4MFYyd>
.
|
There is something similar:
https://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.ufunc.reduceat.html
…On Sun, Feb 19, 2017 at 10:50 PM ebrevdo ***@***.***> wrote:
Is there a numpy equivalent function or composition of functions that do
this?
On Sun, Feb 19, 2017 at 4:24 PM, Andrew Selle ***@***.***>
wrote:
> @ebrevdo <https://github.com/ebrevdo>, @rmlarsen
> <https://github.com/rmlarsen>, what do you two think? What would we call
> such an operation. It does seem useful. I've wanted to do this type of
> thing once or twice, even.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#7662 (comment)
>,
> or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/ABtimxNzOClfnr087AfR8NrJkxeOLF_7ks5reN02gaJpZM4MFYyd
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7662 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA_Auf9fI0NfkizBfh0iBx83-mzwRgtvks5reQ2IgaJpZM4MFYyd>
.
|
To be honest, numpy's |
This functionality seems useful to me. Marking as contributions welcome. |
Isn't this a scan, a gather, and a subtraction? |
@girving Yes, in the case of In the case of product, it is not, because By the way, there are similar thing as the Op I'm implementing named |
Over in numpy/numpy#834, we are discussing how to replace |
This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 1 year. |
Hi,
In my application I need to do operations that dynamically sum some rows of a matrix to get a new matrix. There will be an input tensor named "index" that guides which part of the tensor to be summed.
An example is, if the input matrix is
And the index is
which simply says the output tensor will have two rows (because the "index" have two rows), the first row is the sum of rows with row number i that satisfies
0 <= i < 2
in the input, and the second row is the sum of rows with row number 2. So the result should beI don't find any existing operation that does this job, so I implement it (support only 2d matrix and GPU) by myself. Since I already have an implementation, I'm not requesting a new feature here. But I do want to know that if the tensorflow team is interested in adding this operation as part of tensorflow. If the answer is yes, I will add CPU support (maybe also xla? I have no idea on how to add xla support yet), and then create a pull request for that.
The text was updated successfully, but these errors were encountered: