|
|
|
@ -37,13 +37,13 @@ class BeamSearchOpTester(unittest.TestCase):
|
|
|
|
|
print 'lod', selected_ids.lod()
|
|
|
|
|
|
|
|
|
|
def _create_pre_ids(self):
|
|
|
|
|
np_data = np.array([[1, 2, 3, 4]], dtype='int32')
|
|
|
|
|
np_data = np.array([[1, 2, 3, 4]], dtype='int64')
|
|
|
|
|
tensor = create_tensor(self.scope, "pre_ids", np_data)
|
|
|
|
|
|
|
|
|
|
def _create_ids(self):
|
|
|
|
|
self.lod = [[0, 1, 4], [0, 1, 2, 3, 4]]
|
|
|
|
|
np_data = np.array(
|
|
|
|
|
[[4, 2, 5], [2, 1, 3], [3, 5, 2], [8, 2, 1]], dtype='int32')
|
|
|
|
|
[[4, 2, 5], [2, 1, 3], [3, 5, 2], [8, 2, 1]], dtype='int64')
|
|
|
|
|
tensor = create_tensor(self.scope, "ids", np_data)
|
|
|
|
|
tensor.set_lod(self.lod)
|
|
|
|
|
|
|
|
|
|