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

Feature request: preserve cycle order of open iterators in tf.data.Dataset.interleave #20781

Closed
carlthome opened this issue Jul 13, 2018 · 5 comments
Assignees
Labels
comp:data tf.data related issues stat:awaiting response Status - Awaiting response from author type:feature Feature requests

Comments

@carlthome
Copy link
Contributor

carlthome commented Jul 13, 2018

I'm trying to train RNNs with truncated BPTT with tf.data (a great API by the way!) but got tripped up by these lines as I've assumed an exhausted iterator would result in a new element being opened directly at the same position in the cycle (in order to pass around RNN states reliably).

Instead what seems to be happening is that my sequences are accidentally shifted in in the subsequent .batch() call whenever a sequence is done. Could the default be changed so that a new element is consumed directly as long as there are any left, such that consecutive dataset elements can be batched in a more straightforward way for RNN training.

Or could we have a tf.contrib.data.batched_interleave or similar?

@tensorflowbutler tensorflowbutler added the stat:awaiting response Status - Awaiting response from author label Jul 14, 2018
@tensorflowbutler
Copy link
Member

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

@carlthome
Copy link
Contributor Author

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): N/A
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): N/A
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): v1.9.0-rc2-271-g8955c28 1.9.0-rc0
  • Python version: N/A
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A
  • GPU model and memory: N/A
  • Exact command to reproduce: N/A

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Jul 17, 2018
@carlthome
Copy link
Contributor Author

Not sure why @tensorflowbutler auto-assigned @tatatodd but this seems like a more relevant feature request for @mrry according to commit history (1fa7aae)!

@rmothukuru
Copy link
Contributor

@carlthome,
Sorry for the delayed response. The lines you highlighted are no longer present in the Latest Tensorflow Version (2.5).

Can you please confirm if we can close this issue? Thanks!

@rmothukuru rmothukuru self-assigned this Jun 10, 2021
@rmothukuru rmothukuru added the stat:awaiting response Status - Awaiting response from author label Jun 10, 2021
@carlthome
Copy link
Contributor Author

Yes, let's close and make a new feature request if the need resurfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:data tf.data related issues stat:awaiting response Status - Awaiting response from author type:feature Feature requests
Projects
None yet
Development

No branches or pull requests

5 participants