I am trying to learn deep learning with tensorflow, so excuse my stupid questions. I have been reading different tutorials as 'https://github.com/Hvass-Labs/TensorFlow-Tutorials' and 'https://github.com/u04617/deeplearning/blob/master/mnist_experiments.ipynb' unfortunately I have been confused by some difference in their writing. More specifically I have a question regarding opening a session:
1) what is the difference between
session = tf.Session()
session.run(tf.global_variables_initializer())
session.run(optimizer, feed_dict=feed_dict_train)
and
sess = tf.InteractiveSession()
tf.initialize_all_variables().run()
optimizer.run({x: batch_xs, y_: batch_ys, keep_prob: 0.5})
Indeed, I understand the basic idea behind each of these lines (open a session to execute the graph, initialize the variable for the graph and finally execute the graph given in a dictionary the needed input), but I don't understand the difference from the two above code, especially the last line.