Saturation¶
-
class
safe_learning.
Saturation
(fun, lower, upper, name='saturation')¶ Saturate the output of a DeterministicFunction.
Parameters: - fun : instance of DeterministicFunction.
- lower : float or arraylike
Lower bound. Passed to tf.clip_by_value.
- upper : float or arraylike
Upper bound. Passed to tf.clip_by_value.
Attributes: parameters
Return the variables within the current scope.
scope_name
Return the scope name of the wrapped function.
Methods
__call__
(self, \*args, \*\*kwargs)Evaluate the function using the template to ensure variable sharing. build_evaluation
(self, points)Evaluation, see DeterministicFunction.evaluate. copy_parameters
(self, other_instance)Return a copy of the function (copies parameters). -
build_evaluation
(self, points)¶ Evaluation, see DeterministicFunction.evaluate.
-
copy_parameters
(self, other_instance)¶ Return a copy of the function (copies parameters).
-
parameters
¶ Return the variables within the current scope.
-
scope_name
¶ Return the scope name of the wrapped function.