| 26 | |
| 27 | |
| 28 | class 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 | |
| 51 | def diff(x: tf.Tensor, *, axis: int) -> tf.Tensor: |
nothing calls this directly
no test coverage detected
searching dependent graphs…