diff --git a/train.py b/train.py index 7756ab37..76c6b755 100644 --- a/train.py +++ b/train.py @@ -115,7 +115,7 @@ def train(model, criterion, data_loader, optimizer, epoch): M[n, t] = val e_x = np.exp(M - np.max(M)) M = e_x / e_x.sum(axis=0) # only difference - M = Variable(torch.FloatTensor(M)) + M = Variable(torch.FloatTensor(M)).cuda() M = torch.stack([M]*32) # forward pass