Пример #1
0
 def test_expand_to_beam_size(self):
   x = tf.ones([7, 4, 2, 5])
   x = beam_search._expand_to_beam_size(x, 3)
   with self.test_session() as sess:
     shape = sess.run(tf.shape(x))
   self.assertAllEqual([7, 3, 4, 2, 5], shape)
Пример #2
0
 def test_expand_to_beam_size(self):
   x = tf.ones([7, 4, 2, 5])
   x = beam_search._expand_to_beam_size(x, 3)
   with self.test_session() as sess:
     shape = sess.run(tf.shape(x))
   self.assertAllEqual([7, 3, 4, 2, 5], shape)