Skip to content

Commit 50afe29

Browse files
dnourisoumith
authored andcommitted
open without 'rb' caused Python 3 to open this in text mode and fail (pytorch#133)
1 parent 046abef commit 50afe29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

time_sequence_prediction/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def forward(self, input, future = 0):
3939
np.random.seed(0)
4040
torch.manual_seed(0)
4141
# load data and make training set
42-
data = torch.load(open('traindata.pt'))
42+
data = torch.load('traindata.pt')
4343
input = Variable(torch.from_numpy(data[3:, :-1]), requires_grad=False)
4444
target = Variable(torch.from_numpy(data[3:, 1:]), requires_grad=False)
4545
# build the model

0 commit comments

Comments
 (0)