(self, session=None)
Saves the session, initializes all variables to random values.

    Args:
      session: A tensorflow session.
Saves the session, initializes all variables to random values.
Saves the session initializes all variables to random values .
def initialize_new(self, session=None):
    """Saves the session, initializes all variables to random values.

    Args:
      session: A tensorflow session.
    """
    with self.graph.as_default():
      if session is None:
        self.session = tf.Session(graph=self.graph)
      else:
        self.session = session
      self.session.run(tf.initialize_all_variables())
def initialize_new ( self , session = None ) : with self . graph . as_default ( ) : if session is None : self . session = tf . Session ( graph = self . graph ) else : self . session = session self . session . run ( tf . initialize_all_variables ( ) )