提交 a06ac2d1 编写于 作者: G Ghostish 提交者: Mu Li

update data_iter (#87)

上级 3dd61b2a
......@@ -80,6 +80,7 @@ def data_iter(batch_size, seq_len, ctx=None):
return time_numerical[pos:pos+seq_len]
for i in range(num_batches):
# 每次读取batch_size个随机样本
i = i * batch_size
examples = idx[i:i+batch_size]
data = nd.array(
[_data(j*seq_len) for j in examples], ctx=ctx)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册