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
运行Data_util.py Traceback (most recent call last): File "e:\python\chatbot\Chatbot-tensowflow2.0\Seq2seqchatbot\data_util.py", line 72, in input_lang, target_lang = zip(*word_pairs) ValueError: not enough values to unpack (expected 2, got 0)
查询type(zip(*word_pairs)) <class 'zip'> 这里的错误是我版本不对吗 查询zip用法
a = [1,2,3] b = [4,5,6] c = [4,5,6,7,8] zipped = zip(a,b) # 返回一个对象 zipped <zip object at 0x103abc288> list(zipped) # list() 转换为列表 [(1, 4), (2, 5), (3, 6)] list(zip(a,c)) # 元素个数与最短的列表一致 [(1, 4), (2, 5), (3, 6)]
a1, a2 = zip(zip(a,b)) # 与 zip 相反,zip() 可理解为解压,返回二维矩阵式 list(a1) [1, 2, 3] list(a2) [4, 5, 6]
这里如何修改
The text was updated successfully, but these errors were encountered:
No branches or pull requests
运行Data_util.py
Traceback (most recent call last):
File "e:\python\chatbot\Chatbot-tensowflow2.0\Seq2seqchatbot\data_util.py", line 72, in
input_lang, target_lang = zip(*word_pairs)
ValueError: not enough values to unpack (expected 2, got 0)
查询type(zip(*word_pairs)) <class 'zip'>
这里的错误是我版本不对吗
查询zip用法
这里如何修改
The text was updated successfully, but these errors were encountered: