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]¶
-
- intersect(other)[source]¶
Returns a new Interval constraint that is the intersection of this one and another specified one.
- 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.