Skip to content

Commit a06ac2d

Browse files
Ghostishmli
authored andcommittedOct 25, 2017
update data_iter (d2l-ai#87)
1 parent 3dd61b2 commit a06ac2d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎chapter_recurrent-neural-networks/rnn-scratch.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def data_iter(batch_size, seq_len, ctx=None):
8080
return time_numerical[pos:pos+seq_len]
8181
for i in range(num_batches):
8282
# 每次读取batch_size个随机样本
83+
i = i * batch_size
8384
examples = idx[i:i+batch_size]
8485
data = nd.array(
8586
[_data(j*seq_len) for j in examples], ctx=ctx)

0 commit comments

Comments
 (0)
Please sign in to comment.