Guest User

Untitled

a guest
Jan 16th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. with tf.Session() as sess:
  2. saver.restore(sess, './model_saved')
  3. preds = []
  4. X_batch = last_n_steps_value
  5. X_batch = X_batch.reshape(-1, n_steps, 1)
  6. for i in range(number_you_want_to_predict):
  7. pred = sess.run(outputs, feed_dict={X: X_batch})
  8. preds.append(pred.reshape(7)[-1])
  9. X_batch = X_batch[:, 1:]
  10. # Using predict value to replace real value
  11. X_batch = np.append(X_batch, pred[:, -1])
  12. X_batch = X_batch.reshape(-1, n_steps, 1)
Add Comment
Please, Sign In to add comment