Skip to content

Commit 2c57b00

Browse files
momohattsoumith
authored andcommitted
Replace chunk with split
1 parent b156a6a commit 2c57b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

time_sequence_prediction/train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def forward(self, input, future = 0):
2222
h_t2 = torch.zeros(input.size(0), 51, dtype=torch.double)
2323
c_t2 = torch.zeros(input.size(0), 51, dtype=torch.double)
2424

25-
for input_t in input.chunk(input.size(1), dim=1):
25+
for input_t in input.split(1, dim=1):
2626
h_t, c_t = self.lstm1(input_t, (h_t, c_t))
2727
h_t2, c_t2 = self.lstm2(h_t, (h_t2, c_t2))
2828
output = self.linear(h_t2)

0 commit comments

Comments
 (0)