Created
July 29, 2019 17:50
-
-
Save williamFalcon/296fa0b0605c7e6052d74f89a7d39d68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # each model is sooo big we can't fit both in memory | |
| encoder_rnn.cuda(0) | |
| decoder_rnn.cuda(1) | |
| # run input through encoder on GPU 0 | |
| encoder_out = encoder_rnn(x.cuda(0)) | |
| # run output through decoder on the next GPU | |
| out = decoder_rnn(encoder_out.cuda(1)) | |
| # normally we want to bring all outputs back to GPU 0 | |
| out = out.cuda(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment