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
1、为什么encoder输入是ans文本,decoder输入是ask文本,这样顺序颠倒会不会有啥问题 2、Lang类的实例属性index2word本来就有 {0: "start", 1: "end"},再调用addWord(),index2word变为{0: 'start', 1: 'end', 2: 'start', 3: '是', 4: '王若', 5: '猫', 6: '的', 7: 'end', 8: '那', 9: '什么', 10: '我'},start和end对应两个key会不会影响什么?chatbot回答带start和end有可能是这个原因导致的吗? 3、遍历decoder的每个句子的每个词时,算loss时为啥+=再/bsz?遍历完1batch,为什么返回的loss/target_length? 感觉遍历每个词时,直接+=,等遍历完这个句子+=并/target_length,作为每个句子的平均loss。 遍历完1batch,返回所有句子的平均loss/bsz是否更加合理?
The text was updated successfully, but these errors were encountered:
1、这个我是通过对代码进行微调解决的; 2、start和end的处理方式是按照paper做的,而如果不想回答中有start和end,可以采取字符串截取的方式; 3、这个的话作者应该是按照单次最小的loss来判断训练是否终止,虽然我也觉得用平均loss可能更合理。
Sorry, something went wrong.
感谢回复,调换顺序并优化训练代码后,均loss降到1.2xx对话都顺畅很多
No branches or pull requests
1、为什么encoder输入是ans文本,decoder输入是ask文本,这样顺序颠倒会不会有啥问题
2、Lang类的实例属性index2word本来就有 {0: "start", 1: "end"},再调用addWord(),index2word变为{0: 'start', 1: 'end', 2: 'start', 3: '是', 4: '王若', 5: '猫', 6: '的', 7: 'end', 8: '那', 9: '什么', 10: '我'},start和end对应两个key会不会影响什么?chatbot回答带start和end有可能是这个原因导致的吗?
3、遍历decoder的每个句子的每个词时,算loss时为啥+=再/bsz?遍历完1batch,为什么返回的loss/target_length?
感觉遍历每个词时,直接+=,等遍历完这个句子+=并/target_length,作为每个句子的平均loss。
遍历完1batch,返回所有句子的平均loss/bsz是否更加合理?
The text was updated successfully, but these errors were encountered: