QuadraticFunction¶
-
class
safe_learning.QuadraticFunction(matrix, name='quadratic')¶ A quadratic function.
values(x) = x.T P x
Parameters: - matrix : np.array
2d cost matrix for lyapunov function.
Attributes: parametersReturn the variables within the current scope.
- scope_name
Methods
__call__(self, \*args, \*\*kwargs)Evaluate the function using the template to ensure variable sharing. build_evaluation(self, points)Like evaluate, but returns a tensorflow tensor instead. copy_parameters(self, other_instance)Copy over the parameters of another instance. gradient(self, points)Return the gradient of the function. -
build_evaluation(self, points)¶ Like evaluate, but returns a tensorflow tensor instead.
-
copy_parameters(self, other_instance)¶ Copy over the parameters of another instance.
-
gradient(self, points)¶ Return the gradient of the function.
-
parameters¶ Return the variables within the current scope.