提交 5fee7182 编写于 作者: M Meiyim 提交者: pkpk

fix icafe issue: DLTP-3138 (sequence_unpad compatibility) (#3892)

上级 207c1969
...@@ -69,7 +69,7 @@ def pad_batch_data(insts, ...@@ -69,7 +69,7 @@ def pad_batch_data(insts,
if return_seq_lens: if return_seq_lens:
seq_lens = np.array([len(inst) for inst in insts]) seq_lens = np.array([len(inst) for inst in insts])
return_list += [seq_lens.astype("int64").reshape([-1, 1])] return_list += [seq_lens.astype("int64").reshape([-1])]
return return_list if len(return_list) > 1 else return_list[0] return return_list if len(return_list) > 1 else return_list[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册