@@ -355,12 +355,12 @@ max_steps = 64
355
355
#@tab mxnet, pytorch
356
356
features = d2l.zeros((T - tau - max_steps + 1, tau + max_steps))
357
357
# Column `i` (`i` < `tau`) are observations from `x` for time steps from
358
- # `i + 1 ` to `i + T - tau - max_steps + 1`
358
+ # `i` to `i + T - tau - max_steps + 1`
359
359
for i in range(tau):
360
360
features[:, i] = x[i: i + T - tau - max_steps + 1].T
361
361
362
362
# Column `i` (`i` >= `tau`) are the (`i - tau + 1`)-step-ahead predictions for
363
- # time steps from `i + 1 ` to `i + T - tau - max_steps + 1`
363
+ # time steps from `i` to `i + T - tau - max_steps + 1`
364
364
for i in range(tau, tau + max_steps):
365
365
features[:, i] = d2l.reshape(net(features[:, i - tau: i]), -1)
366
366
```
@@ -369,12 +369,12 @@ for i in range(tau, tau + max_steps):
369
369
#@tab tensorflow
370
370
features = tf.Variable(d2l.zeros((T - tau - max_steps + 1, tau + max_steps)))
371
371
# Column `i` (`i` < `tau`) are observations from `x` for time steps from
372
- # `i + 1 ` to `i + T - tau - max_steps + 1`
372
+ # `i` to `i + T - tau - max_steps + 1`
373
373
for i in range(tau):
374
374
features[:, i].assign(x[i: i + T - tau - max_steps + 1].numpy().T)
375
375
376
376
# Column `i` (`i` >= `tau`) are the (`i - tau + 1`)-step-ahead predictions for
377
- # time steps from `i + 1 ` to `i + T - tau - max_steps + 1`
377
+ # time steps from `i` to `i + T - tau - max_steps + 1`
378
378
for i in range(tau, tau + max_steps):
379
379
features[:, i].assign(d2l.reshape(net((features[:, i - tau: i])), -1))
380
380
```
0 commit comments