0
コードブロックの最後にある値のエラーを参照してください。このエラーは翻訳チュートリアルの実行中に発生しました。これがなぜ壊れたのか?私はCUDAとCuDNNが正しくインストールされたpython3を実行しています。インストールの指示に従ってTensorFlowのインストールを確認できたので、CuDNN/CUDAの基本機能が動作するはずです。私はUbuntu 16.04でpython3を使用しています。TensorFlow translate.pyチュートリアル
最近、翻訳チュートリアルを使用している他の人にこの問題がありましたか?このチュートリアルが他の人のために働いていると思っているとき、私がなぜこの問題を抱えているのか知っていますか?
`(tensorflow) [email protected]:~/repos/tensorflow/models/tutorials/rnn/translate$ python3 translate.py --data_dir ~/data/tensorflow/translate/
Preparing WMT data in /home/nathan/data/tensorflow/translate/
2017-05-16 22:18:50.664841: 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-16 22:18:50.664859: 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-16 22:18:50.664864: 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-16 22:18:50.664868: 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-16 22:18:50.664872: 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.
2017-05-16 22:18:50.665996: E tensorflow/stream_executor/cuda/cuda_driver.cc:405] failed call to cuInit: CUDA_ERROR_UNKNOWN
2017-05-16 22:18:50.666149: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: nathan1
2017-05-16 22:18:50.666157: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: nathan1
2017-05-16 22:18:50.666177: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 375.66.0
2017-05-16 22:18:50.666323: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:369] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 375.66 Mon May 1 15:29:16 PDT 2017
GCC version: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
"""
2017-05-16 22:18:50.666338: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 375.66.0
2017-05-16 22:18:50.666343: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:300] kernel version seems to match DSO: 375.66.0
Creating 3 layers of 1024 units.
Traceback (most recent call last):
File "translate.py", line 322, in <module>
tf.app.run()
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "translate.py", line 319, in main
train()
File "translate.py", line 178, in train
model = create_model(sess, False)
File "translate.py", line 136, in create_model
dtype=dtype)
File "/home/nathan/repos/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 179, in __init__
softmax_loss_function=softmax_loss_function)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1201, in model_with_buckets
decoder_inputs[:bucket[1]])
File "/home/nathan/repos/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 178, in <lambda>
lambda x, y: seq2seq_f(x, y, False),
File "/home/nathan/repos/tensorflow/models/tutorials/rnn/translate/seq2seq_model.py", line 142, in seq2seq_f
dtype=dtype)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 855, in embedding_attention_seq2seq
encoder_cell, encoder_inputs, dtype=dtype)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn.py", line 197, in static_rnn
(output, state) = call_cell()
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn.py", line 184, in <lambda>
call_cell = lambda: cell(input_, state)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 881, in __call__
return self._cell(embedded, state)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 953, in __call__
cur_inp, new_state = cell(cur_inp, cur_state)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 146, in __call__
with _checked_scope(self, scope or "gru_cell", reuse=self._reuse):
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/home/nathan/.local/lib/python3.5/site-packages/tensorflow/contrib/rnn/python/ops/core_rnn_cell_impl.py", line 77, in _checked_scope
type(cell).__name__))
ValueError: Attempt to reuse RNNCell <tensorflow.contrib.rnn.python.ops.core_rnn_cell_impl.GRUCell object at 0x7f0b66e04b70> with a different variable scope than its first use. First use of cell was with scope 'embedding_attention_seq2seq/embedding_attention_decoder/attention_decoder/multi_rnn_cell/cell_0/gru_cell', this attempt is with scope 'embedding_attention_seq2seq/rnn/multi_rnn_cell/cell_0/gru_cell'. Please create a new instance of the cell if you would like it to use a different set of weights. If before you were using: MultiRNNCell([GRUCell(...)] * num_layers), change to: MultiRNNCell([GRUCell(...) for _ in range(num_layers)]). If before you were using the same cell instance as both the forward and reverse cell of a bidirectional RNN, simply create two instances (one for forward, one for reverse). In May 2017, we will start transitioning this cell's behavior to use existing stored weights, if any, when it is called with scope=None (which can lead to silent model degradation, so this error will remain until then.`
のsRaw - 更新に感謝。シーケンスのシーケンスを行う新しいチュートリアルはありますか? –