Extracting values from Tensorflow Variable

Use the following code:

tensor_1 = tf.get_default_graph().get_tensor_by_name("weights1:0")
tesnor_2 = tf.get_default_graph().get_tensor_by_name("biases1:0")
sess = tf.Session()
np_arrays = sess.run([tensor_1, tensor_2])

Also there are other ways to store the variable for later use or analysis. Please specify your purpose for extracting weights and biases. Comment further if further discussion is needed.