Skip to content

Conversation

@lns
Copy link

@lns lns commented Dec 2, 2016

Add support for cell other than lstm, which uses state_is_tuple=True. Remove of unused state 'c' and 'h' in feed.

start = time.time()
x, y = data_loader.next_batch()
feed = {model.input_data: x, model.targets: y}
for i, (c, h) in enumerate(model.initial_state):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @lns, are you sure about this? Could you point me to a resource which says passing the state directly is permitted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I take a look at the recent sources of tensorflow( rnn_cell_impl.py and seq2seq.py(?)) and the code seems changed a lot. In my experiments with r11(?) it's safe to remove these lines to have reasonable results. I'm not 100% sure about the way of passing states to a lstm cell, as we are using self.initial_state in rnn_decoder in model.py which is not(?) updated across the batches. If we want to pass the states from the last batch to the next batch, maybe there are more lines to be changed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you, filed an issue tensorflow/models#774

@hugovk
Copy link
Contributor

hugovk commented Feb 16, 2017

@lns This PR has merge conflicts.

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

Successfully merging this pull request may close these issues.

3 participants