(self, dev)
| 351 | np.reshape(a.transpose(TRANSPOSE_AXES), RESHAPE_DIMS)) |
| 352 | |
| 353 | def _concatenate_helper(self, dev): |
| 354 | np1 = np.random.random([5, 6, 7, 8]).astype(np.float32) |
| 355 | np2 = np.random.random([5, 6, 7, 1]).astype(np.float32) |
| 356 | np3 = np.concatenate((np1, np2), axis=3) |
| 357 | |
| 358 | t1 = tensor.Tensor(device=dev, data=np1) |
| 359 | t2 = tensor.Tensor(device=dev, data=np2) |
| 360 | |
| 361 | t3 = tensor.concatenate((t1, t2), 3) |
| 362 | |
| 363 | np.testing.assert_array_almost_equal(tensor.to_numpy(t3), np3) |
| 364 | |
| 365 | def test_concatenate_cpu(self): |
| 366 | self._concatenate_helper(cpu_dev) |
no test coverage detected