コード例 #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)
コード例 #6
0
 def test_not_tf(self):
     x = np.array([1,2,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
コード例 #7
0
 def test_3D_tensor(self):
     x = tf.zeros([2,1,3])
     with self.assertRaises(TypeError):
         check_is_tf_vector(x)
コード例 #8
0
 def test_2D_tensor_vector(self):
     x = tf.zeros([2,1])
     check_is_tf_vector(x)
コード例 #9
0
 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)