Exemplo n.º 1
0
 def test_tensor_with_one_element_is_strictly_increasing(self):
   with self.test_session():
     self.assertTrue(check_ops.is_strictly_increasing([1]).eval())
Exemplo n.º 2
0
 def test_empty_tensor_is_strictly_increasing(self):
   with self.test_session():
     self.assertTrue(check_ops.is_strictly_increasing([]).eval())
Exemplo n.º 3
0
 def test_2d_decreasing_tensor_is_not_strictly_increasing(self):
   with self.test_session():
     self.assertFalse(
         check_ops.is_strictly_increasing([[1, 3], [2, 4]]).eval())
Exemplo n.º 4
0
 def test_increasing_rank_two_tensor(self):
   with self.test_session():
     self.assertTrue(
         check_ops.is_strictly_increasing([[-1, 2], [3, 4]]).eval())
Exemplo n.º 5
0
 def test_empty_tensor_is_strictly_increasing(self):
   self.assertTrue(self.evaluate(check_ops.is_strictly_increasing([])))
Exemplo n.º 6
0
 def test_constant_tensor_is_not_strictly_increasing(self):
   with self.test_session():
     self.assertFalse(check_ops.is_strictly_increasing([1, 1, 1]).eval())
Exemplo n.º 7
0
 def test_tensor_with_one_element_is_strictly_increasing(self):
   self.assertTrue(self.evaluate(check_ops.is_strictly_increasing([1])))
Exemplo n.º 8
0
 def test_increasing_rank_two_tensor(self):
   self.assertTrue(
       self.evaluate(check_ops.is_strictly_increasing([[-1, 2], [3, 4]])))
Exemplo n.º 9
0
 def test_2d_decreasing_tensor_is_not_strictly_increasing(self):
   self.assertFalse(
       self.evaluate(check_ops.is_strictly_increasing([[1, 3], [2, 4]])))
Exemplo n.º 10
0
 def test_decreasing_tensor_is_not_strictly_increasing(self):
   self.assertFalse(self.evaluate(
       check_ops.is_strictly_increasing([1, 0, -1])))
Exemplo n.º 11
0
 def test_constant_tensor_is_not_strictly_increasing(self):
   self.assertFalse(self.evaluate(check_ops.is_strictly_increasing([1, 1, 1])))