tensorflow / models

Models and examples built with TensorFlow
Other
77.18k stars 45.75k forks source link

#Textsum# Encounter the error "Cannot assign a device to node 'seq2seq/encoder3/BiRNN_BW/BiRNN_BW/Max'" #384

Closed wjbianjason closed 8 years ago

wjbianjason commented 8 years ago

My device is only one Tesla K40m My tensorflow version is 0.8.0 I just run the following command "bazel-bin/textsum/seq2seq_attention \ --mode=train \ --article_key=article \ --abstract_key=abstract \ --data_path=data/data \ --vocab_path=data/vocab \ --log_root=textsum/log_root \ --train_dir=textsum/log_root/train" then I encounter the error as follow: File "/home/bianweijie/github/summary/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 200, in main _Train(model, batcher) File "/home/bianweijie/github/summary/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 100, in _Train sess = sv.prepare_or_wait_for_session() File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/supervisor.py", line 687, in prepare_or_wait_for_session init_feed_dict=self._init_feed_dict, init_fn=self._init_fn) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/session_manager.py", line 170, in prepare_session max_wait_secs=max_wait_secs, config=config) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/training/session_manager.py", line 209, in recover_session sess.run([self._local_init_op]) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 367, in run run_metadata_ptr) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 640, in _run feed_dict_string, options, run_metadata) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 708, in _do_run target_list, options, run_metadata) File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 728, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors.InvalidArgumentError: Cannot assign a device to node 'seq2seq/encoder3/BiRNN_BW/BiRNN_BW/Max': Could not satisfy explicit device specification '/device:GPU:0' because no supported kernel for GPU devices is available. [[Node: seq2seq/encoder3/BiRNN_BW/BiRNN_BW/Max = Max[T=DT_INT32, keep_dims=false, _device="/device:GPU:0"](article_lens, seq2seq/encoder3/BiRNN_BW/BiRNN_BW/Const_1)]] Caused by op u'seq2seq/encoder3/BiRNN_BW/BiRNN_BW/Max', defined at: File "/home/bianweijie/github/summary/bazel-bin/textsum/seq2seq_attention.runfiles/__main__/textsum/seq2seq_attention.py", line 217, in <module> tf.app.run() File "/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run

poxvoculi commented 8 years ago

Please see #377

ghost commented 8 years ago

Try to remove the folder textsum/log_root/ and run your command again.

tatatodd commented 8 years ago

@wjbianjason does pr #377 and/or @ppfliu's suggestion of removing textsum/log_root help with your problem?

wjbianjason commented 8 years ago

@poxvoculi sorry to check this question late, your answer have help me deal with this problem,thank you @ppfliu now i think no neccessary to do it @tatatodd thank you for check my question,I'll close this issue