(self)
| 124 | np.testing.assert_allclose(out, expected, atol=1e-2) |
| 125 | |
| 126 | def test_flatten(self): |
| 127 | g = Graph() |
| 128 | a = g.input((2, 3)) |
| 129 | y = a.flatten() |
| 130 | |
| 131 | g.set_input(a, np.array([[1, 2, 3], [4, 5, 6]], dtype=np.float16)) |
| 132 | g.execute() |
| 133 | |
| 134 | out = y.numpy() |
| 135 | expected = np.array([1, 2, 3, 4, 5, 6], dtype=np.float16) |
| 136 | np.testing.assert_allclose(out, expected, atol=1e-2) |
| 137 | |
| 138 | def test_concat(self): |
| 139 | g = Graph() |