MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testTile

Method testTile

tensorflow/compiler/tests/binary_ops_test.py:1385–1435  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1383 equality_test=self.ListsAreClose)
1384
1385 def testTile(self):
1386 for dtype in self.numeric_types:
1387 self._testBinary(
1388 array_ops.tile,
1389 np.array([[6], [3], [4]], dtype=dtype),
1390 np.array([2, 0], dtype=np.int32),
1391 expected=np.empty([6, 0], dtype=dtype))
1392 self._testBinary(
1393 array_ops.tile,
1394 np.array([[6, 3, 4]], dtype=dtype),
1395 np.array([2, 0], dtype=np.int32),
1396 expected=np.empty([2, 0], dtype=dtype))
1397 self._testBinary(
1398 array_ops.tile,
1399 np.array([[6]], dtype=dtype),
1400 np.array([1, 2], dtype=np.int32),
1401 expected=np.array([[6, 6]], dtype=dtype))
1402 self._testBinary(
1403 array_ops.tile,
1404 np.array([[1], [2]], dtype=dtype),
1405 np.array([1, 2], dtype=np.int32),
1406 expected=np.array([[1, 1], [2, 2]], dtype=dtype))
1407 self._testBinary(
1408 array_ops.tile,
1409 np.array([[1, 2], [3, 4]], dtype=dtype),
1410 np.array([3, 2], dtype=np.int32),
1411 expected=np.array(
1412 [[1, 2, 1, 2],
1413 [3, 4, 3, 4],
1414 [1, 2, 1, 2],
1415 [3, 4, 3, 4],
1416 [1, 2, 1, 2],
1417 [3, 4, 3, 4]],
1418 dtype=dtype))
1419 self._testBinary(
1420 array_ops.tile,
1421 np.array([[1, 2], [3, 4]], dtype=dtype),
1422 np.array([1, 1], dtype=np.int32),
1423 expected=np.array(
1424 [[1, 2],
1425 [3, 4]],
1426 dtype=dtype))
1427 self._testBinary(
1428 array_ops.tile,
1429 np.array([[1, 2]], dtype=dtype),
1430 np.array([3, 1], dtype=np.int32),
1431 expected=np.array(
1432 [[1, 2],
1433 [1, 2],
1434 [1, 2]],
1435 dtype=dtype))
1436
1437 def testTranspose(self):
1438 for dtype in self.numeric_types:

Callers

nothing calls this directly

Calls 2

_testBinaryMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected