Closed zklgame closed 7 years ago
I am also having a problem with translate.py --self_test I have tensorflow R1.2 installed python -c 'import tensorflow as tf; print(tf.version)' 1.2.0
~/tensorflow/tensorflow/models/tutorials/rnn/translate$ python translate.py --self_test
2017-07-07 09:57:04.585901: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX512F instructions, but these are available on your machine and could speed up CPU computations.
2017-07-07 09:57:06.287275: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: Tesla P4
major: 6 minor: 1 memoryClockRate (GHz) 1.1135
pciBusID 0000:86:00.0
Total memory: 7.46GiB
Free memory: 7.34GiB
2017-07-07 09:57:06.287319: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-07-07 09:57:06.287323: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-07-07 09:57:06.287360: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla P4, pci bus id: 0000:86:00.0)
Self-test for neural translation model.
Traceback (most recent call last):
File "translate.py", line 322, in
@nealwu PTAL.
@ebrevdo could you take a look?
Fixed at master.
the interest in the rnn tutorials is that they make very very nice HW evaluation benchmarks straightforward..very clean so it might be good to keep the idea of the tutorials as the basis for hw evaluation in mind tf_cnn_benchmarks is what we have converged on for CNNs the rnn tutorials make a solid next piece :-)
when could I download a functioning translate version? what would be needed in the base TF install? (full rebuild?) thanks again d
On Fri, Jul 7, 2017 at 8:03 PM, ebrevdo notifications@github.com wrote:
Fixed at master.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1875#issuecomment-313829430, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT0BhJEQeu73gjpld_J3izawKpABNks5sLvGSgaJpZM4OPqRN .
@tfboyd any thoughts from the hardware/benchmarking perspective?
I would not use these for benchmarking hardware unless they are the only examples. If you take a look at out benchmarks page, we use a script called tf_cnn_benchmark. Unfortunately, it currently only does CNNs but that is changing.
We are using tf_cnn_benchmarks for cnns. For rnns we need something else. It appears ptb can be modified a bit ( print out words per second during verify) and it is then rather useful as the memory requirements are easily changed. It would appear translate could work for grus. D
On Jul 10, 2017 3:15 PM, "Toby Boyd" notifications@github.com wrote:
I would not use these for benchmarking hardware unless they are the only examples. If you take a look at out benchmarks page, we use a script called tf_cnn_benchmark. Unfortunately, it currently only does CNNs but that is changing.
https://www.tensorflow.org/performance/benchmarks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1875#issuecomment-314265420, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT7-ug4UUsFgN9SaSuAQAAj37x-ucks5sMqKRgaJpZM4OPqRN .
The perf team should be updating ptb soon, if my memory is correct. We have some tweaks to have it use cuDNN, which should make it a much better measure. If you want to track the progress or track getting a good RNN benchmark, open a ticket and assign to me or mention me and I will assign it to myself and update it with progress. Glad/hope you find the benchmark tool useful.
Toby
On Mon, Jul 10, 2017 at 10:07 PM, David-Levinthal notifications@github.com wrote:
We are using tf_cnn_benchmarks for cnns. For rnns we need something else. It appears ptb can be modified a bit ( print out words per second during verify) and it is then rather useful as the memory requirements are easily changed. It would appear translate could work for grus. D
On Jul 10, 2017 3:15 PM, "Toby Boyd" notifications@github.com wrote:
I would not use these for benchmarking hardware unless they are the only examples. If you take a look at out benchmarks page, we use a script called tf_cnn_benchmark. Unfortunately, it currently only does CNNs but that is changing.
https://www.tensorflow.org/performance/benchmarks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/tensorflow/models/issues/1875#issuecomment-314265420 , or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT7- ug4UUsFgN9SaSuAQAAj37x-ucks5sMqKRgaJpZM4OPqRN .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1875#issuecomment-314324146, or mute the thread https://github.com/notifications/unsubscribe-auth/AWZestL-kZxIGZkpcQoXC9cMts4M8A8iks5sMwL0gaJpZM4OPqRN .
Fantastic. Will do Thanks
On Jul 11, 2017 6:04 PM, "Toby Boyd" notifications@github.com wrote:
The perf team should be updating ptb soon, if my memory is correct. We have some tweaks to have it use cuDNN, which should make it a much better measure. If you want to track the progress or track getting a good RNN benchmark, open a ticket and assign to me or mention me and I will assign it to myself and update it with progress. Glad/hope you find the benchmark tool useful.
Toby
On Mon, Jul 10, 2017 at 10:07 PM, David-Levinthal < notifications@github.com> wrote:
We are using tf_cnn_benchmarks for cnns. For rnns we need something else. It appears ptb can be modified a bit ( print out words per second during verify) and it is then rather useful as the memory requirements are easily changed. It would appear translate could work for grus. D
On Jul 10, 2017 3:15 PM, "Toby Boyd" notifications@github.com wrote:
I would not use these for benchmarking hardware unless they are the only examples. If you take a look at out benchmarks page, we use a script called tf_cnn_benchmark. Unfortunately, it currently only does CNNs but that is changing.
https://www.tensorflow.org/performance/benchmarks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/tensorflow/models/issues/1875# issuecomment-314265420 , or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT7- ug4UUsFgN9SaSuAQAAj37x-ucks5sMqKRgaJpZM4OPqRN .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/tensorflow/models/issues/1875#issuecomment-314324146 , or mute the thread https://github.com/notifications/unsubscribe-auth/AWZestL- kZxIGZkpcQoXC9cMts4M8A8iks5sMwL0gaJpZM4OPqRN .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1875#issuecomment-314492212, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT3nGmLBtameNLmOFYrYL42VLwXpjks5sM50fgaJpZM4OPqRN .
RNN Benchmark derived from rnn tutorial #1983
d
On Tue, Jul 11, 2017 at 9:04 AM, Toby Boyd notifications@github.com wrote:
The perf team should be updating ptb soon, if my memory is correct. We have some tweaks to have it use cuDNN, which should make it a much better measure. If you want to track the progress or track getting a good RNN benchmark, open a ticket and assign to me or mention me and I will assign it to myself and update it with progress. Glad/hope you find the benchmark tool useful.
Toby
On Mon, Jul 10, 2017 at 10:07 PM, David-Levinthal < notifications@github.com> wrote:
We are using tf_cnn_benchmarks for cnns. For rnns we need something else. It appears ptb can be modified a bit ( print out words per second during verify) and it is then rather useful as the memory requirements are easily changed. It would appear translate could work for grus. D
On Jul 10, 2017 3:15 PM, "Toby Boyd" notifications@github.com wrote:
I would not use these for benchmarking hardware unless they are the only examples. If you take a look at out benchmarks page, we use a script called tf_cnn_benchmark. Unfortunately, it currently only does CNNs but that is changing.
https://www.tensorflow.org/performance/benchmarks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/tensorflow/models/issues/1875# issuecomment-314265420 , or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT7- ug4UUsFgN9SaSuAQAAj37x-ucks5sMqKRgaJpZM4OPqRN .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/tensorflow/models/issues/1875#issuecomment-314324146 , or mute the thread https://github.com/notifications/unsubscribe-auth/AWZestL- kZxIGZkpcQoXC9cMts4M8A8iks5sMwL0gaJpZM4OPqRN .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/1875#issuecomment-314492212, or mute the thread https://github.com/notifications/unsubscribe-auth/AIUuT3nGmLBtameNLmOFYrYL42VLwXpjks5sM50fgaJpZM4OPqRN .
Traceback (most recent call last):
File "F:/test/models-master/tutorials/rnn/translate/a.py", line 315, in
修改这个问题的方法将seq2seq_model.py中line133的:
def seq2seq_f(encoder_inputs, decoder_inputs, do_decode):
return tf.contrib.legacy_seq2seq.embedding_attention_seq2seq(
encoder_inputs,
decoder_inputs, cell,
num_encoder_symbols=source_vocab_size,
num_decoder_symbols=target_vocab_size,
embedding_size=size,
output_projection=output_projection,
feed_previous=do_decode,
dtype=dtype)
change to: def seq2seq_f(encoder_inputs, decoder_inputs, do_decode): tmp_cell = copy.deepcopy(cell) return tf.contrib.legacy_seq2seq.embedding_attention_seq2seq( encoder_inputs, decoder_inputs, tmp_cell, num_encoder_symbols=source_vocab_size, num_decoder_symbols=target_vocab_size, embedding_size=size, output_projection=output_projection, feed_previous=do_decode, dtype=dtype)
I download the code, go to tutorials/rnn/translate, run the command:
but something wrong happened:
I check the code, line 129 of seq2seq_model.py is:
cell = tf.contrib.rnn.MultiRNNCell([single_cell() for _ in range(num_layers)])
Continued: I found why the error happened:
If I don't use deep copy, but define encoder_cell and decoder_cell separately:
and make corresponding changes,then the program will run correctly!
So why this happened? Thanks for any explanation.