We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for l_x, s_x, l_y, s_y, l in zip(lengths_x, seqs_x, lengths_y, seqs_y, labels): if l_x > maxlen_1: new_seqs_x.append(s_x[-maxlen_1:]) new_lengths_x.append(maxlen_1) else: new_seqs_x.append(s_x) new_lengths_x.append(l_x) if l_y > maxlen_2: new_seqs_y.append(s_y[:maxlen_2]) new_lengths_y.append(maxlen_2) else: new_seqs_y.append(s_y) new_lengths_y.append(l_y)
这里为什么s_x是取后maxlen_1的词,而s_y是取前maxlen_2的词
The text was updated successfully, but these errors were encountered:
我在看代码的时候也觉得这里很奇怪,,不知道是不是 训练集有关
Sorry, something went wrong.
No branches or pull requests
for l_x, s_x, l_y, s_y, l in zip(lengths_x, seqs_x, lengths_y, seqs_y, labels):
if l_x > maxlen_1:
new_seqs_x.append(s_x[-maxlen_1:])
new_lengths_x.append(maxlen_1)
else:
new_seqs_x.append(s_x)
new_lengths_x.append(l_x)
if l_y > maxlen_2:
new_seqs_y.append(s_y[:maxlen_2])
new_lengths_y.append(maxlen_2)
else:
new_seqs_y.append(s_y)
new_lengths_y.append(l_y)
这里为什么s_x是取后maxlen_1的词,而s_y是取前maxlen_2的词
The text was updated successfully, but these errors were encountered: