-
Notifications
You must be signed in to change notification settings - Fork 74k
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
tf.split's -1 support doesn't handle zero dimensions #19360
Comments
Here's a colab exhibiting the problem, though since the repro is a single line it's not really necessary: https://drive.google.com/file/d/1AyZLBPYkiB3HgUZYL9cWZx3IFu2OzcTI/view?usp=sharing |
@benoitsteiner: Did you introduce this restriction? Can't tell if 53f6845 is yours. |
@ekelsen might have more insight into that particular commit? |
Nagging Assignee @karmel: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
Bump for @ekelsen - do you have any insight here, or is someone else a better bet? |
Nagging Assignee @karmel: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
Nagging Assignee @karmel: It has been 29 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
Nagging Assignee @karmel: It has been 44 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
Bumping @ekelsen again, who may be back? |
Nagging Assignee @girving: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly. |
I sent a PR fixing this two weeks ago, so nagged me is unnecessary. Hopefully the PR will be reviewed at some point. |
1. Don't break if the size corresponding to a -1 is 0. 2. Infer the size corresponding to a -1 if possible. Fixes tensorflow#19360.
System information
tf.split(tf.zeros([0]), [0, -1], axis=-1)
Describe the problem
The variable size version of
tf.split
(SplitV
in C++) allows one of the sizes to be -1. The corresponding output will expand as necessary so that the total output size matches the input.Unfortunately, the -1 support currently assumes the -1 dimension corresponds to positive size. It should handle zero as well. E.g., this should work, but it doesn't:
By comparison, the positive case works fine:
The text was updated successfully, but these errors were encountered: