def open_session(self):
        """ Open tensorflow session. Exposed for memory management. """
        with self._graph.as_default():
            init = tf.initialize_all_variables()
            self._sess = tf.Session()
            self._sess.run(init)