MCPcopy
hub / github.com/GPflow/GPflow / Datum

Class Datum

tests/gpflow/likelihoods/test_function_params.py:28–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28class Datum:
29 cs = ShapeChecker().check_shapes
30 rng = np.random.default_rng(20220623)
31
32 batch = (1, 2)
33 N = 5
34 D = 3
35 Q = 2
36 X_shape = (*batch, N, D)
37 Y_shape = (*batch, N, Q)
38
39 np_X_positive = rng.random(X_shape)
40 np_X_positive[:, :, :, 0] = np.linspace(0.1, 1.0, N)[None, None, :]
41 X_positive = to_default_float(np_X_positive)
42 X_negative = to_default_float(-rng.random(X_shape))
43 F = to_default_float(0.5 * np.ones(Y_shape))
44 Fmu = to_default_float(0.5 * np.ones(Y_shape))
45 Fvar = to_default_float(0.1 * np.ones(Y_shape))
46 Y = to_default_float(0.5 * np.ones(Y_shape))
47
48 linear = Linear(A=[[1.0, 1.0], [0.0, 0.0], [0.0, 0.0]], b=0.0)
49
50
51def diff(x: tf.Tensor, *, axis: int) -> tf.Tensor:

Callers

nothing calls this directly

Calls 2

to_default_floatFunction · 0.90
LinearClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…