MCPcopy
hub / github.com/GPflow/GPflow / __init__

Method __init__

tests/gpflow/test_base_prior.py:97–110  ·  view source on GitHub ↗
(self, with_transform: bool)

Source from the content-addressed store, hash-verified

95 log_scale = 0.4
96
97 def __init__(self, with_transform: bool) -> None:
98 super().__init__()
99
100 prior = tfp.distributions.Normal(to_default_float(1.0), to_default_float(1.0))
101
102 scale = np.exp(self.log_scale)
103 if with_transform:
104 transform = tfp.bijectors.Shift(to_default_float(0.0))(
105 tfp.bijectors.Scale(to_default_float(scale))
106 )
107 else:
108 transform = None
109
110 self.theta = gpflow.Parameter(self.value, prior=prior, transform=transform)
111
112 def maximum_log_likelihood_objective(self, *args: Any, **kwargs: Any) -> tf.Tensor:
113 assert not args

Callers

nothing calls this directly

Calls 1

to_default_floatFunction · 0.90

Tested by

no test coverage detected