1 Answers

0
votes

Changing this lines of code will help you in training model on GPU

textsum/seq2seq_attention.py

# change this line
# tf.app.flags.DEFINE_integer('num_gpus', 0, 'Number of gpus used.')
tf.app.flags.DEFINE_integer('num_gpus', 1, 'Number of gpus used.')

textsum/seq2seq_attention_model.py

# if self._num_gpus > 1:
#     self._cur_gpu = (self._cur_gpu + 1) % (self._num_gpus-1)
self._cur_gpu = (self._cur_gpu + 1) % (self._num_gpus-1 if self._num_gpus > 1 else self._num_gpus)

reference issue link