Ejemplo n.º 1
0
 def testBatchContainsBatch(self):
     batch1 = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])
     batch2 = np.array([[3, 4], [3, 4], [1, 2]])
     self.assertTrue(test_utils.contains(batch1, batch2))
Ejemplo n.º 2
0
 def testBatchContainsSample(self):
     batch = np.array([[1, 2], [3, 4]])
     sample = np.array([3, 4])
     self.assertTrue(test_utils.contains(batch, [sample]))
Ejemplo n.º 3
0
 def testBatchDoesNotContainSample(self):
     batch = np.array([[1, 2], [3, 4]])
     sample = np.array([2, 4])
     self.assertFalse(test_utils.contains(batch, [sample]))
 def _assertContains(self, list1, list2):
   self.assertTrue(
       test_utils.contains(list1, list2), '%s vs. %s' % (list1, list2))