Created
July 29, 2019 17:49
-
-
Save williamFalcon/65ef3a6017bdcd469838f94bbc8e7dc9 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
# copy model on each GPU and give a fourth of the batch to each | |
model = DataParallel(model, devices=[0, 1, 2 ,3]) | |
# out has 4 outputs (one for each gpu) | |
out = model(x.cuda(0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment