提交 863786d7 编写于 作者: G guosheng

Fix bug of pool sort

上级 db8d8890
......@@ -274,11 +274,8 @@ class DataReader(object):
if self._sort_type == SortType.POOL:
for i in range(0, len(infos), self._pool_size):
infos[i * self._pool_size:(i + 1) *
self._pool_size] = sorted(
infos[i * self._pool_size:(i + 1) *
self._pool_size],
key=lambda x: x.max_len)
infos[i:i + self._pool_size] = sorted(
infos[i:i + self._pool_size], key=lambda x: x.max_len)
# concat batch
batches = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册