示例#1
0
 def test_not_tf(self):
     x = np.array([1, 2, 3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
示例#2
0
 def test_2D_tensor_vector(self):
     x = tf.zeros([2, 1])
     check_is_tf_vector(x)
示例#3
0
 def test_3D_tensor(self):
     x = tf.zeros([2, 1, 3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
示例#4
0
 def test_scalar(self):
     x = tf.constant(0.0)
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
示例#5
0
 def test_1D_tensor_scalar(self):
     x = tf.zeros([1])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
 def test_not_tf(self):
     x = np.array([1,2,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
 def test_3D_tensor(self):
     x = tf.zeros([2,1,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
 def test_2D_tensor_vector(self):
     x = tf.zeros([2,1])
     check_is_tf_vector(x)
 def test_1D_tensor_scalar(self):
     x = tf.zeros([1])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
示例#10
0
 def test_scalar(self):
     x = tf.constant(0.0)
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)