import tensorflow as tf
sess = tf.InteractiveSession()

"""
Explanation: Ch 02: Concept 07
Loading variables
Concept 06 was about saving variables. This one's about loading what you saved. Start by creating an interactive session:
End of explanation
"""


spikes = tf.Variable([False]*8, name='spikes')

"""
Explanation: Create a boolean vector called spikes of the same dimensions as before:
End of explanation
"""


saver = tf.train.Saver()

try:
    saver.restore(sess, 'spikes.ckpt')
    print(spikes.eval())
except:
    print('file not found')


"""
Explanation: Restored the variable data from disk, serve warm, and enjoy:
End of explanation
"""


sess.close()

"""
Explanation: Show's over, goodnight:
End of explanation
"""


