rfho/hyper_gradients.py
def step_forward(self, train_feed_dict_supplier=None, summary_utils=None):
        """
        Updates for one step both model parameters (according to the optimizer dynamics) and
        Z-variables.

        :param train_feed_dict_supplier: (optional) A callable with signature `t ->  feed_dict` to pass to
                                        `tf.Session.run`
                                    feed_dict argument
        :param summary_utils: (optional) object with method `run(session, iteration)`
        :return: feed dictionary for this step
        """

        if not train_feed_dict_supplier:
            train_feed_dict_supplier = lambda: None

        ss = tf.get_default_session()

        # noinspection PyNoneFunctionAssignment
        fd = cmo(train_feed_dict_supplier, self.global_step.eval())

        ss.run(self._zs_assigns, feed_dict=fd)
        ss.run(self.fw_ops, feed_dict=fd)

        if summary_utils:  # TODO delete!
            summary_utils.run(ss, self.global_step.eval())

        self.global_step.increase.eval()
        return fd

        Updates for one step both model parameters (according to the optimizer dynamics) and
        Z-variables.

        :param train_feed_dict_supplier: (optional) A callable with signature `t ->  feed_dict` to pass to
                                        `tf.Session.run`
                                    feed_dict argument
        :param summary_utils: (optional) object with method `run(session, iteration)`
        :return: feed dictionary for this step
        
Updates for one step both model parameters (according to the optimizer dynamics) and
Z-variables.
Updates for one step both model parameters ( according to the optimizer dynamics ) and Z - variables .
def step_forward(self, train_feed_dict_supplier=None, summary_utils=None):
        if not train_feed_dict_supplier:
            train_feed_dict_supplier = lambda: None
        ss = tf.get_default_session()
        fd = cmo(train_feed_dict_supplier, self.global_step.eval())
        ss.run(self._zs_assigns, feed_dict=fd)
        ss.run(self.fw_ops, feed_dict=fd)
        if summary_utils:  
            summary_utils.run(ss, self.global_step.eval())
        self.global_step.increase.eval()
        return fd
def step_forward ( self , train_feed_dict_supplier = None , summary_utils = None ) : if not train_feed_dict_supplier : train_feed_dict_supplier = lambda : None ss = tf . get_default_session ( ) fd = cmo ( train_feed_dict_supplier , self . global_step . eval ( ) ) ss . run ( self . _zs_assigns , feed_dict = fd ) ss . run ( self . fw_ops , feed_dict = fd ) if summary_utils : summary_utils . run ( ss , self . global_step . eval ( ) ) self . global_step . increase . eval ( ) return fd
Updates for one step both model parameters (according to the optimizer dynamics) and
Z-variables.
Updates for one step both model parameters ( according to the optimizer dynamics ) and Z - variables .
"""
        Updates for one step both model parameters (according to the optimizer dynamics) and
        Z-variables.

        :param train_feed_dict_supplier: (optional) A callable with signature `t ->  feed_dict` to pass to
                                        `tf.Session.run`
                                    feed_dict argument
        :param summary_utils: (optional) object with method `run(session, iteration)`
        :return: feed dictionary for this step
        """ # noinspection PyNoneFunctionAssignment # TODO delete!
feed dictionary for this step
feed dictionary for this step
self
train_feed_dict_supplier
(optional) A callable with signature `t ->  feed_dict` to pass to
`tf.Session.run`
feed_dict argument
( optional ) A callable with signature ` t - > feed_dict ` to pass to ` tf . Session . run ` feed_dict argument
summary_utils
(optional) object with method `run(session, iteration)`
( optional ) object with method ` run ( session iteration ) `