1193d96d48cf1db1f4902b4bd613880defd1b8ab,gpytorch/constraints/constraints.py,Interval,inverse_transform,#Interval#Any#,94
Before Change
upper_bound = self.upper_bound
upper_bound[upper_bound == math.inf] = 1
lower_bound = self.lower_bound
lower_bound[lower_bound == -math.inf] = 0
tensor = transformed_tensor - self.lower_bound
tensor = tensor / self.upper_bound
After Change
if not self.enforced:
return transformed_tensor
if settings.debug.on():
max_bound = torch.max(self.upper_bound)
min_bound = torch.min(self.lower_bound)
if max_bound == math.inf or min_bound == -math.inf:
raise RuntimeError(
"Cannot make an Interval directly with non-finite bounds. Use a derived class like "
"GreaterThan or LessThan instead."
)
tensor = self._inv_transform((transformed_tensor - self.lower_bound) / self.upper_bound)
return tensor
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: cornellius-gp/gpytorch
Commit Name: 1193d96d48cf1db1f4902b4bd613880defd1b8ab
Time: 2019-04-02
Author: jake.gardner@uber.com
File Name: gpytorch/constraints/constraints.py
Class Name: Interval
Method Name: inverse_transform
Project Name: cornellius-gp/gpytorch
Commit Name: 1193d96d48cf1db1f4902b4bd613880defd1b8ab
Time: 2019-04-02
Author: jake.gardner@uber.com
File Name: gpytorch/constraints/constraints.py
Class Name: Interval
Method Name: transform
Project Name: cornellius-gp/gpytorch
Commit Name: c517e0b8b34a85b8142b4669c152b6e62c02d8e2
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: diag
Project Name: cornellius-gp/gpytorch
Commit Name: 2ceed3bc57e2e890cd5c80d3f38ae544971c30f4
Time: 2018-05-01
Author: gpleiss@gmail.com
File Name: gpytorch/functions/inv_matmul.py
Class Name: InvMatmul
Method Name: forward