Esempio n. 1
0
 def test_shape_list(self):
   y = tf.constant(4.0)
   x = tf.ones([7, tf.to_int32(tf.sqrt(y)), 2, 5])
   shape = beam_search._shape_list(x)
   self.assertIsInstance(shape[0], int)
   self.assertIsInstance(shape[1], tf.Tensor)
   self.assertIsInstance(shape[2], int)
   self.assertIsInstance(shape[3], int)
Esempio n. 2
0
 def test_shape_list(self):
   y = tf.constant(4.0)
   x = tf.ones([7, tf.cast(tf.sqrt(y), dtype=tf.int32), 2, 5])
   shape = beam_search._shape_list(x)
   self.assertIsInstance(shape[0], int)
   self.assertIsInstance(shape[1], tf.Tensor)
   self.assertIsInstance(shape[2], int)
   self.assertIsInstance(shape[3], int)
Esempio n. 3
0
 def test_shape_list(self):
     y = tf.placeholder(dtype=tf.int32, shape=[])
     x = tf.ones([7, y, 2, 5])
     shape = beam_search._shape_list(x)
     self.assertIsInstance(shape[0], int)
     self.assertIsInstance(shape[1], tf.Tensor)
     self.assertIsInstance(shape[2], int)
     self.assertIsInstance(shape[3], int)