Exemplo n.º 1
0
 def test_not_tf(self):
     x = np.array([1, 2, 3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 2
0
 def test_2D_tensor_vector(self):
     x = tf.zeros([2, 1])
     check_is_tf_vector(x)
Exemplo n.º 3
0
 def test_3D_tensor(self):
     x = tf.zeros([2, 1, 3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 4
0
 def test_scalar(self):
     x = tf.constant(0.0)
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 5
0
 def test_1D_tensor_scalar(self):
     x = tf.zeros([1])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 6
0
 def test_not_tf(self):
     x = np.array([1,2,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 7
0
 def test_3D_tensor(self):
     x = tf.zeros([2,1,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 8
0
 def test_2D_tensor_vector(self):
     x = tf.zeros([2,1])
     check_is_tf_vector(x)
Exemplo n.º 9
0
 def test_1D_tensor_scalar(self):
     x = tf.zeros([1])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
Exemplo n.º 10
0
 def test_scalar(self):
     x = tf.constant(0.0)
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)