Skip to content
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_v() is removed in master? #6405

Closed
wookayin opened this issue Dec 19, 2016 · 4 comments
Closed

tf.split_v() is removed in master? #6405

wookayin opened this issue Dec 19, 2016 · 4 comments
Assignees

Comments

@wookayin
Copy link
Contributor

wookayin commented Dec 19, 2016

A bit of history:

  • Until <= 0.12, tf.split() has the following signature:
    tf.split(split_dim, num_split, value, name='split')
  • In commit f803bd7 (since 0.12), a new op split_v() is introduced:
    tf.split_v(value, size_splits, split_dim=0, num=None, name="split_v")
  • In commit a46b6d2 (master), tf.split_v() is finally renamed to tf.split():
    tf.split(value, num_or_size_splits, axis=0, num=None, name="split")

Due to these changes, the signature of tf.split() has been changed. AFAIK TensorFlow will having some of breaking changes after 0.12 (after the end of 2016); is this backward-incompatible API change intended?

If so, my suggestion is that tf.split_v(), which has been introduced in 0.12, should not be removed in the newer versions as well. In the current master, tf.split_v is non-existent.

AttributeError: 'module' object has no attribute 'split_v'

I am reporthing this (minor) issue because I am frequently switching the tensorflow versions, from r0.12 (stable branch) to master (the breaking? future), and thus I need a way to write a code that is both compatible in those two versions. However, due to the change of tf.split(), it seems that I cannot achieve it at the moment.

Thanks,

@aselle
Copy link
Contributor

aselle commented Dec 19, 2016

We are making several backward incompatible changes. The final state is what you are seeing in the latest master branch where split_v() is removed and split() exists with the keyword arguments

tf.split(value, num_or_size_splits, axis=0, num=None, name="split")

To switch between versions, you will need to creat a local compatiblity wrapper that keys off of tf.__version__ or uses exceptions to try the newest form and if the keyword arguments don't match use the previous form (this is probably easier). Hope this helps.

@aselle aselle self-assigned this Dec 19, 2016
@aselle aselle added the stat:awaiting response Status - Awaiting response from author label Dec 19, 2016
@wookayin
Copy link
Contributor Author

wookayin commented Dec 20, 2016

Thanks for the feedback. I was assuming backward-incompatible changes, but also was confused since I could find there is a similar change on tf.concat(): in r0.12 we have both concat_v2() and concat() (I expect the v2 method will replace the original soon).

However, if the changes are intended, perhaps we might not need to add a method such as tf.split_v() because it eventually would be a legacy, though the changes seem quite radical. For now, it would be better for me to try alternative approaches as you suggested.

@aselle aselle removed the stat:awaiting response Status - Awaiting response from author label Dec 20, 2016
@tfboyd
Copy link
Member

tfboyd commented Jun 16, 2017

Automatically closing due to lack of recent activity. We hope that you were able to resolve it on your own. However, since this is a support issue rather than a bug or feature request, you will probably get more information by posting it on StackOverflow.

@tfboyd tfboyd closed this as completed Jun 16, 2017
@wookayin
Copy link
Contributor Author

Yeah, I think this is not necessary any more since it has been a while after TF 1.0 came out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants