(self, con, kl_step)
return abs(con) < 0.1 * kl_step
Function that checks whether dual gradient descent has converged.
Function that checks whether dual gradient descent has converged.
Function that checks whether dual gradient descent has converged .
def _conv_check(self, con, kl_step):
        """Function that checks whether dual gradient descent has converged."""
        if self.cons_per_step:
            return all([abs(con[t]) < (0.1*kl_step[t]) for t in range(con.size)])
        return abs(con) < 0.1 * kl_step
def _conv_check ( self , con , kl_step ) : if self . cons_per_step : return all ( [ abs ( con [ t ] ) < ( 0.1 * kl_step [ t ] ) for t in range ( con . size ) ] ) return abs ( con ) < 0.1 * kl_step