gpytorch.constraints¶
Parameter Constraints¶
Interval¶
-
class
gpytorch.constraints.
Interval
(lower_bound, upper_bound, transform=<built-in method sigmoid of type object>, inv_transform=<function inv_sigmoid>, initial_value=None)[source]¶ -
initial_value
¶ The initial parameter value (if specified, None otherwise)
-
intersect
(other)[source]¶ Returns a new Interval constraint that is the intersection of this one and another specified one.
Parameters: other (Interval) – Interval constraint to intersect with Returns: intersection if this interval with the other one. Return type: Interval
-
transform
(tensor)[source]¶ Transforms a tensor to satisfy the specified bounds.
If upper_bound is finite, we assume that self.transform saturates at 1 as tensor -> infinity. Similarly, if lower_bound is finite, we assume that self.transform saturates at 0 as tensor -> -infinity.
Example transforms for one of the bounds being finite include torch.exp and torch.nn.functional.softplus. An example transform for the case where both are finite is torch.nn.functional.sigmoid.
-