rfho/hyper_gradients.py
def initialize(self, session=None):
        """
        Helper for initializing all the variables. Builds and runs model variables, 
        Zs and global step initializers.
        
        :param session: optional tensorflow session (if None default session is used) 
        
        :return: None
        """
        ss = session or tf.get_default_session()
        assert ss, 'No default tensorflow session!'
        if isinstance(self.w, MergedVariable):
            self.w.initialize(session=session)
        else:
            ss.run(tf.variables_initializer([self.w]))  # never tested
        ss.run(tf.variables_initializer(self.hyper_gradient_vars + [self.global_step.var]))
        [z.initializer().run() for z in self.zs]
        return True

        Helper for initializing all the variables. Builds and runs model variables, 
        Zs and global step initializers.
        
        :param session: optional tensorflow session (if None default session is used) 
        
        :return: None
        
Helper for initializing all the variables. Builds and runs model variables,
Zs and global step initializers.
Helper for initializing all the variables . Builds and runs model variables Zs and global step initializers .
def initialize(self, session=None):
        ss = session or tf.get_default_session()
        assert ss, 'No default tensorflow session!'
        if isinstance(self.w, MergedVariable):
            self.w.initialize(session=session)
        else:
            ss.run(tf.variables_initializer([self.w]))  
        ss.run(tf.variables_initializer(self.hyper_gradient_vars + [self.global_step.var]))
        [z.initializer().run() for z in self.zs]
        return True
def initialize ( self , session = None ) : ss = session or tf . get_default_session ( ) assert ss , 'No default tensorflow session!' if isinstance ( self . w , MergedVariable ) : self . w . initialize ( session = session ) else : ss . run ( tf . variables_initializer ( [ self . w ] ) ) ss . run ( tf . variables_initializer ( self . hyper_gradient_vars + [ self . global_step . var ] ) ) [ z . initializer ( ) . run ( ) for z in self . zs ] return True
Helper for initializing all the variables.
Helper for initializing all the variables .
"""
        Helper for initializing all the variables. Builds and runs model variables, 
        Zs and global step initializers.
        
        :param session: optional tensorflow session (if None default session is used) 
        
        :return: None
        """ # never tested
None
self
session
optional tensorflow session (if None default session is used)
optional tensorflow session ( if None default session is used )