Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with tf.Session() as sess:
- saver.restore(sess, './model_saved')
- preds = []
- X_batch = last_n_steps_value
- X_batch = X_batch.reshape(-1, n_steps, 1)
- for i in range(number_you_want_to_predict):
- pred = sess.run(outputs, feed_dict={X: X_batch})
- preds.append(pred.reshape(7)[-1])
- X_batch = X_batch[:, 1:]
- # Using predict value to replace real value
- X_batch = np.append(X_batch, pred[:, -1])
- X_batch = X_batch.reshape(-1, n_steps, 1)
Add Comment
Please, Sign In to add comment