Skip to content

Commit 1c2ff21

Browse files
authored
Merge pull request #117 from skysign/master
Transferring 'current_seq' to CPU from GPU
2 parents 6ba1dff + 072bf76 commit 1c2ff21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

project-tv-script-generation/dlnd_tv_script_generation.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@
786786
" word = int_to_vocab[word_i]\n",
787787
" predicted.append(word) \n",
788788
" \n",
789+
" if(train_on_gpu):\n",
790+
" current_seq = current_seq.cpu() # move to cpu\n",
789791
" # the generated word becomes the next \"current sequence\" and the cycle can continue\n",
790792
" if train_on_gpu:\n",
791793
" current_seq = current_seq.cpu()\n",

0 commit comments

Comments
 (0)