(x, y)
| 11 | |
| 12 | |
| 13 | def _default_compare_fn(x, y): |
| 14 | if isinstance(x, tensor) and not isinstance(x, VarNode): |
| 15 | x = x.numpy() |
| 16 | elif not isinstance(x, np.ndarray): |
| 17 | x = get_var_value(x) |
| 18 | assert isinstance(x, np.ndarray) |
| 19 | np.testing.assert_allclose(x, y, rtol=1e-6) |
| 20 | |
| 21 | |
| 22 | def make_tensor(x, network=None, device=None): |
nothing calls this directly
no test coverage detected