| 136 | np.testing.assert_allclose(out, expected, atol=1e-2) |
| 137 | |
| 138 | def test_concat(self): |
| 139 | g = Graph() |
| 140 | a = g.input((2, 2)) |
| 141 | b = g.input((2, 2)) |
| 142 | y = a.concat(b, axis=0) |
| 143 | |
| 144 | g.set_input(a, np.array([[1, 2], [3, 4]], dtype=np.float16)) |
| 145 | g.set_input(b, np.array([[5, 6], [7, 8]], dtype=np.float16)) |
| 146 | g.execute() |
| 147 | |
| 148 | out = y.numpy() |
| 149 | expected = np.array([[1, 2], [3, 4], [5, 6], [7, 8]], dtype=np.float16) |
| 150 | np.testing.assert_allclose(out, expected, atol=1e-2) |
| 151 | |
| 152 | def test_cat_1d(self): |
| 153 | g = Graph() |