From 7364c0c9ef7d6dc988d9e42643fe691cfe50242c Mon Sep 17 00:00:00 2001 From: Daniel Nouri Date: Fri, 7 Apr 2017 16:20:15 -0400 Subject: [PATCH] open without 'rb' caused Python 3 to open this in text mode and fail --- time_sequence_prediction/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/time_sequence_prediction/train.py b/time_sequence_prediction/train.py index 1aa99222a8..4829a93ec4 100644 --- a/time_sequence_prediction/train.py +++ b/time_sequence_prediction/train.py @@ -39,7 +39,7 @@ def forward(self, input, future = 0): np.random.seed(0) torch.manual_seed(0) # load data and make training set - data = torch.load(open('traindata.pt')) + data = torch.load('traindata.pt') input = Variable(torch.from_numpy(data[3:, :-1]), requires_grad=False) target = Variable(torch.from_numpy(data[3:, 1:]), requires_grad=False) # build the model