-
Notifications
You must be signed in to change notification settings - Fork 74.2k
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
[TF2.0] Broadcasting #26204
Comments
@rmlarsen , @jvishnuvardhan ping |
@awav thankfully when we do add support for this this it will not be an API removal; it just takes code which currently does not work and make it work. So I don't think we need to block the tf2.0 release on fixing this, though it'd be very nice. @rmlarsen now that we have a proper batch_matmul can we make it broadcast correctly on leading indices? I feel like this shouldn't be hard but I'm not familiar enough with eigen intricacies to make this happen. |
This should be now fixed! (pending 3 week compatibility window) |
@bloops , That is fantastic news. Will |
Only for matmul. What else do you have in mind? |
@bloops, ideally, all linear algebra operations, as far as I know some of them already have broadcasting support. The |
Hello @bloops , any updates on |
Sorry, I am not working on it currently. |
@bloops , does anyone else is going to work on that? Do you know what should be changed in the code to make it work? |
@bloops , ping? :) |
One year has passed!!! Thanks to @srvasude. |
Closing since triangular solve now has broadcasting. |
Hello everyone,
I would like resuscitate very old issue. Actually, it is so old that even github's autocompletion doesn't offer it after typing "#" - #216. This request was raised several times, but still it hasn't been resolved.
In short, broadcasting interface is not "good enough" in TensorFlow :)
Lets first check how broadcasting works in
numpy
:Now, let's check what the TF is offering:
Ouch! The "correct" way of doing it in the TF (of course there are other) is:
You can see how much effort it requires to make operations broadcastable for two distinct tensors: extract leading shape from the left tensor, extract shape from the right tensors, concatenate these shapes with correct axis, call
tf.broadcast_to
...The same applies to cholesky, triangular solve and other operations. That is very upsetting that such a crucial feature isn't available out of the box.
Another concern is the performance of these "solutions". E.g. memory consumption for tiling and
broadcast_to
operations, as they simply copy the tensor to match leading dimensions. Of course, native TensorFlow broadcasting implementation would be preferable in this case.Kind regards,
Artem Artemev
The text was updated successfully, but these errors were encountered: