(self)
Update the discretized values when the Lyapunov function changes.
Update the discretized values when the Lyapunov function changes.
Update the discretized values when the Lyapunov function changes .
def update_values(self):
        """Update the discretized values when the Lyapunov function changes."""
        # Use a placeholder to avoid loading a large discretization into the
        # TensorFlow graph
        storage = get_storage(self._storage)
        if storage is None:
            tf_points = tf.placeholder(config.dtype,
                                       shape=[None, self.discretization.ndim],
                                       name='discretization_points')
            tf_values = self.lyapunov_function(tf_points)
            storage = [('points', tf_points), ('values', tf_values)]
            set_storage(self._storage, storage)
        else:
            tf_points, tf_values = storage.values()

        feed_dict = self.feed_dict
        feed_dict[tf_points] = self.discretization.all_points
        self.values = tf_values.eval(feed_dict).squeeze()
def update_values ( self ) : # Use a placeholder to avoid loading a large discretization into the # TensorFlow graph storage = get_storage ( self . _storage ) if storage is None : tf_points = tf . placeholder ( config . dtype , shape = [ None , self . discretization . ndim ] , name = 'discretization_points' ) tf_values = self . lyapunov_function ( tf_points ) storage = [ ( 'points' , tf_points ) , ( 'values' , tf_values ) ] set_storage ( self . _storage , storage ) else : tf_points , tf_values = storage . values ( ) feed_dict = self . feed_dict feed_dict [ tf_points ] = self . discretization . all_points self . values = tf_values . eval ( feed_dict ) . squeeze ( )