if self.n_inputs != 1:
raise ValueError("Currently only supports univariate input per time-step")
preds = list()
x = np.zeros(shape=(1, self.n_lag, 1), dtype=np.float32)
for i in range(self.n_lag):
x[0, i, 0] = start_ts[i]
init_state = np.zeros(shape=(1, self.state_size))
for i in range(n):
yhat = self.predict_op.eval(feed_dict={self.X: x,
After Change
if self.n_inputs != 1:
raise ValueError("Currently only supports univariate input per time-step")
seq = list(np.reshape(start_ts, newshape=(-1,)))
logger.debug("seq: %s" % str(seq))
preds = list()
init_state = np.zeros(shape=(1, self.state_size))
for i in range(n):
ts = seq[-self.n_lag:]
X_batch = np.array(ts).reshape(1, self.n_lag, self.n_inputs)
yhat = self.predict_op.eval(feed_dict={self.X: X_batch,
self.init_state: init_state})
logger.debug("pred: %d %s" % (i, str(yhat)))
preds.append(yhat[0, 0])