I was successfully able to run the training against the sample data but when I run the command to decode, I get the below error. Now one thing to note, as I may have misunderstood, but I did take the sample data and renamed it to both train-0 and test-0 which test-0 gets passed to the eval. If this is correct, anyone seen the below issue? Im running this on Ubuntu 16.04 with Cuda 8 and CudNN 5.1.
Traceback (most recent call last):
File "/home/daniel/Documents/Projects/headgen/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 212, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/home/daniel/Documents/Projects/headgen/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 208, in main
decoder.DecodeLoop()
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_decode.py", line 101, in DecodeLoop
if not self._Decode(self._saver, sess):
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_decode.py", line 140, in _Decode
best_beam = bs.BeamSearch(sess, article_batch_cp, article_lens_cp)[0]
File "/home/daniel/Documents/Projects/headgen/textsum/beam_search.py", line 113, in BeamSearch
sess, latest_tokens, enc_top_states, states)
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_model.py", line 283, in decode_topk
feed_dict=feed)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 717, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 864, in _run
feed_dict = nest.flatten_dict_items(feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/nest.py", line 186, in flatten_dict_items
% (len(flat_i), len(flat_v), flat_i, flat_v))
ValueError: Could not flatten dictionary. Key had 2 elements, but value had 1 elements. Key: [<tf.Tensor 'seq2seq/encoder3/BiRNN/FW/FW/cond_119/Merge_1:0' shape=(4, 256) dtype=float32>, <tf.Tensor 'seq2seq/encoder3/BiRNN/FW/FW/cond_119/Merge_2:0' shape=(4, 256) dtype=float32>], value: [array([[[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446]],
[[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446]],
[[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446]],
[[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446],
[ 1.82187247, 1.01413488, -3.0360837 , ..., 4.59846687,
5.06266212, -1.28980446]]], dtype=float32)].
I see the same issue when running decode on a toy data, and on my own dataset. Have you been able to solve that?
Well happy to hear I wasn't the only one seeing this as I thought I was a lone wolf :p The fact that I was unable to find anyone else having this issue, I felt the problem might be due to the fact that I was trying to run the latest versions of everything. Ubuntu 16.04, CUDA 8 and Cudnn 5.1.5.
That said, I spent quite a bit of time this weekend tracking the issue down and it seemed to be related to a combo of TF 0.10 and the latest bazel. When I upgraded my macbook I had the same issue, so then I decided to test the theory last night when I had some time and went back to TF 0.9 and cuda 7.5 and cudnn 4. Overnight I ran the training and this morning I tried a test run against the same toy data path for the decode. It is still running but good thing is it is running without any errors. It is sitting right now at the below message but from what I have seen on Google, this seems to be normal but I really don't know yet as I have not had a successful end to end run yet. I will let you know how it goes either way, but it seems to have resolved the issue. Once verified, I would still like to then trace down the issue a bit more later.
One thing I noticed also was when I was training, during the start there was a warning message around some shape function that was used that was going to be deprecated (or was) and the error above is around shape as well so I was leaning towards this potentially being the source.
I will update here with my findings and please do the same should you figure something out. To quickly test this, I did just install the binary with GPU support and I'm not sure what that sets the default "compute ability" to. So I will let this run some more and see if anything changes and I get some results, but if not then I will try rebuilding from sources using cuda 7.5 and cudnn 5 possibly and see if that helps any.
I have just tried to uninstall TensorFlow 0.10, install 0.9, rerun training on toy dataset and decode on the same set. It is working! There are no messages in console, but I see that GPU is loaded (which for some reason doesn't happen on training), and results started to appear in log_root/decode folder. Looks like the file with name starting from "decode" should contain summarized texts, and I see there a bunch of "output=
I will try to retrain it on a larger dataset (CNN/DailyMail) and check if it will give better results.
Now I'm certain that the "Could not flatten dictionary" error is related to TensorFlow 0.10.
Wow! I never thought to actually look in the decode folder. I assumed that the results would appear in the console. Thanks so much for the info! I guess I would have been waiting for a while lol. So when I stopped the training this morning, my current avg_loss was 0.000018. My decoding has been going on for about 8 hours now and I have both file prefixed with 'decode' which contain entries like:
output=of <UNK> <UNK> to be <UNK> <UNK> <UNK> .
Then I also have files prefixed with 'ref' that contain entries like the entry below which is more inline with what I was expecting to see.
output=closure of territories to be partially lifted tuesday .
Thanks again for the response, as it was helpful. Due to so many unknowns, I assume I need to allow the training to continue longer. Will post should I find anything more.
Hi,
I'm also having the same issue. I trained with textsum with the given toy data. And just to see the results, I tested with the same data. The decoder is giving me unknowns, similar to
output=of <UNK> <UNK> to be <UNK> <UNK> <UNK> .
I ran the training for 10000 steps with 16 hidden units and the training got converged. I verified the convergence using tensorboard (training loss) graphs
tensorboard --logdir=<>
Am I missing any thing ? Did any one find the reasons to why it is happening and fixed the issue ?
Unfortunately I have not found why this is happening yet. I have not had much time this week to look further into it due to work current work load but I'm hoping to try to trace a bit deeper this weekend into why we are seeing this.
I am going to ask in here as well whether anyone at any point has successfully been able to get valid "decode" results with just the test data set. Perhaps the reason the results look so good in the readme is because it was trained against the Gigaword dataset. I'm leaning towards this not being the issue, but I thought I should ask just in-case someone has a definitive answer. Perhaps there is really not an issue here and it really is just that the small dataset that we are training against is the problem. As when I first start out, I get all
I think I found why it is happening with at least the given toy data set. In my case, I trained and tested with the same toy set given (the data & vocab files). The reason why I'm getting
This issue is still a problem with regards to version 0.10 however with regards to what tumusudheer stated above, this is infact the problem with regards to the
<unk>
issue. I am attaching my generated vocab file here. I will also go about submitting a pull request for the updated vocab file.
vocab.txt
For those who run into the "Key had 2 elements, but value had 1 elements." issue in 0.10
or 0.11
, hack of adding state_is_tuple=False
to instantiations of LSTMCell
in seq2seq_attention_model.py
seems to fix things.
Unfortunately this will be deprecated, but don't see easy way to get cell states at final time step from call to bidirectional_rnn
and feed those in when using tuples...
@zxie This was occurring against 0.10 and working fine in 0.9 which is what most of us did and downgraded. Currently my local machine is performing training on a large dataset so I have not tried upgrading to 0.11. However last week I did want to see how well an AWS G2 instance would work and installed 0.11, with cuda 8 and cudnn 5.1.5 and I did not see the issue. After training I am going to attempt to upgrade my personal box and see if it is in fact resolved, however I am leaning towards this issue being resolved in 0.11. If anyone else can verify, please add a comment otherwise after training I will attempt an upgrade again and see if it is resolved and provide info here.
@xtr33me : Any updates on whether whether 0.11 resolves this?
@asimshankar last night I stopped my textsum training and tested a decode and was noticing that in my decode results, a majority of the time I was seeing headlines that didn't seem to be extracted from the same article the reference headline was from. I looked back through other tickets only to find others have seen the same thing and some stating to upgrade to 0.11. So I figured it was as good a time as any to try and upgrade to 0.11 again to see if this issue has been resolved here as well as whether I got better results for decoding.
I will go about closing this out as I am not seeing the same issue with 0.11. Now I just installed 0.11 via the pip installer as I was heading to bed. So I did not try this with Cuda 8 and a full rebuild from source, but regardless this seems to be fine as of now. Should I find the issue is still occurring in the future upon upgrading other components, I will go about re-opening with more details.
@asimshankar @zxie @panyx0718 Well I spoke too soon. During training I did not see the problem at all, however again during an attempt at decoding I am still seeing the below issue. This is also data trained using the newly installed wheel.
Just for reference, when installing 0.11 I used this pip installer wheel file:
Traceback (most recent call last):
File "/home/daniel/Documents/Projects/headgen/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 212, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "/home/daniel/Documents/Projects/headgen/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 208, in main
decoder.DecodeLoop()
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_decode.py", line 101, in DecodeLoop
if not self._Decode(self._saver, sess):
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_decode.py", line 140, in _Decode
best_beam = bs.BeamSearch(sess, article_batch_cp, article_lens_cp)[0]
File "/home/daniel/Documents/Projects/headgen/textsum/beam_search.py", line 113, in BeamSearch
sess, latest_tokens, enc_top_states, states)
File "/home/daniel/Documents/Projects/headgen/textsum/seq2seq_attention_model.py", line 283, in decode_topk
feed_dict=feed)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 717, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 864, in _run
feed_dict = nest.flatten_dict_items(feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/nest.py", line 186, in flatten_dict_items
% (len(flat_i), len(flat_v), flat_i, flat_v))
ValueError: Could not flatten dictionary. Key had 2 elements, but value had 1 elements. Key: [<tf.Tensor 'seq2seq/encoder3/BiRNN/FW/FW/cond_119/Merge_1:0' shape=(8, 256) dtype=float32>, <tf.Tensor 'seq2seq/encoder3/BiRNN/FW/FW/cond_119/Merge_2:0' shape=(8, 256) dtype=float32>], value: [array([[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]],
[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]],
[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]],
...,
[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]],
[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]],
[[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
...,
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172],
[ 8.20701504, 2.38994765, 0.78461325, ..., 0.59550816,
4.80752277, -0.33005172]]], dtype=float32)].
@zxie I forgot that you provided the state_is_tuple equal to false solution. I just finished trying that out and that did in-fact resolve the issue with regards to this ticket and the error. I am unsure as to whether that means it should be closed, but it did allow the decode to get past the errors shown above. Especially as you very well pointed out, that state_is_tuple is being deprecated.
One other thing, when I reinstalled 0.11 and cudnn 5 last night it seemed that I was getting an error when trying to decode against the data generated in 0.8, cuda 7 and cudnn 4. So I restarted last night. Just running for a bit more than a day on my 980m, I had an average loss of a little over 4. Running with the state_is_tuple=false seems to be giving me werid results but I cant be fully sure it is just that I have not trained long enough. The data I trained on 0.9 I let run for 5 days.
These are the results I am seeing below. Again I'm still new to all this so I'm not sure if setting tuple=false is just masking the actual problem.
DECODED:
output=| The News
output=of the News
output=- The News
output=of the News
output=
output=| The News
output=of the News
output=| News
output=| The News
output=of the News
output=- The News
output=of the News
REFERENCE:
output=WATCH: Jokowi quotes Duterte on Veloso's case
output='Why haven't they been arrested?' Readers' fury over youths terrorising neighbourhood
output=Sanders Supporters Protest: Hell No, DNC, We Wont Vote for Hillary
output=Physicists observe brand-new state of matter in an unexpected material
output=19 Tweets Anyone Addicted To Diet Coke Will Completely Relate To
output=Looking for Seasonal Work-From-Home Opportunities? Check Out These Companies
output=Police release photo of Winfield bank robbery suspect
output=These Public Enemy Action Figures Are A Must-Buy For Any Fan
@panyx0718 , @peterjliu, could you provide some help here?
I just merged some changes to set state_is_tuple=False explicitly to
maintain the original behavior.
On Mon, Oct 31, 2016 at 1:52 PM, Andrew Selle [email protected]
wrote:
@panyx0718 https://github.com/panyx0718 , @peterjliu
https://github.com/peterjliu, could you provide some help here?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/models/issues/417#issuecomment-257417313,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACwQe8PU50VoyZTbBI-5x1rKrGq8qccSks5q5lUlgaJpZM4J-Vtv
.
Thanks
Xin
With the changes made above by @panyx0718 , this issue is resolved. Going to close.
Hello why went run code are will be show that ...
(tensorflow)[root@192 textsum]# python seq2seq_attention.py --mode=decode --article_key=article --abstract_key=abstract --data_path=data/data --vocab_path=data/vocab --log_root=textsum/log_root --decode_dir=textsum/log_root/decode --beam_size=8
2017-05-21 08:18:58.098394: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 08:18:58.098492: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 08:18:58.098500: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 08:18:58.098506: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-05-21 08:18:58.098512: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
File "seq2seq_attention.py", line 213, in
tf.app.run()
File "/usr/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "seq2seq_attention.py", line 209, in main
decoder.DecodeLoop()
File "/root/textsum/seq2seq_attention_decode.py", line 102, in DecodeLoop
if not self._Decode(self._saver, sess):
File "/root/textsum/seq2seq_attention_decode.py", line 141, in _Decode
best_beam = bs.BeamSearch(sess, article_batch_cp, article_lens_cp)[0]
File "/root/textsum/beam_search.py", line 114, in BeamSearch
sess, latest_tokens, enc_top_states, states)
File "/root/textsum/seq2seq_attention_model.py", line 288, in decode_topk
feed_dict=feed)
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 778, in run
run_metadata_ptr)
File "/usr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 925, in _run
feed_dict = nest.flatten_dict_items(feed_dict)
File "/usr/lib/python2.7/site-packages/tensorflow/python/util/nest.py", line 190, in flatten_dict_items
% (len(flat_i), len(flat_v), flat_i, flat_v))
ValueError: Could not flatten dictionary. Key had 2 elements, but value had 1 elements. Key: [
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]],
[[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]],
[[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]],
...,
[[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]],
[[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]],
[[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
...,
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268],
[ -5.73786211, 1.13906038, 0.19180578, ..., 1.89918554,
22.41424751, -5.96897268]]], dtype=float32)].
(tensorflow)[root@192 textsum]#
Most helpful comment
For those who run into the "Key had 2 elements, but value had 1 elements." issue in
0.10
or0.11
, hack of addingstate_is_tuple=False
to instantiations ofLSTMCell
inseq2seq_attention_model.py
seems to fix things.Unfortunately this will be deprecated, but don't see easy way to get cell states at final time step from call to
bidirectional_rnn
and feed those in when using tuples...