Created
October 19, 2017 02:17
-
-
Save zou3519/f13145cafbb873a855ef524d6607125a to your computer and use it in GitHub Desktop.
This script gets stuck, but only on some machines...
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
from torch import nn | |
from torch.autograd import Variable | |
import torch | |
l = nn.Linear(5,5).cuda() | |
pl = nn.DataParallel(l) | |
print("Checkpoint 1") | |
a = Variable(torch.rand(5,5).cuda(), requires_grad=True) | |
print("Checkpoint 2") | |
print(pl(a)) # Here it gets stuck | |
print("Checkpoint 3") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment