zhaoyingjun / chatbot

ChatGPT带火了聊天机器人,主流的趋势都调整到了GPT类模式,本项目也与时俱进,会在近期更新GPT类版本。基于本项目和自己的语料可以训练出自己想要的聊天机器人,用于智能客服、在线问答、闲聊等场景。
3.51k stars 1.02k forks source link

SeqGAN Tokenizer #61

Open AlucardNosferatu opened 4 years ago

AlucardNosferatu commented 4 years ago

为了让程序能够运行修改了Tokenizer前读取文件Gfile的部分,把读取模式从r改成rb,后面训练进行时发现vocab是空的,而且在train的idx文件里看所有语句的每个词的id都是3,搞不懂是怎么回事,最近急需用这个东西,给作者添麻烦了,不好意思

AlucardNosferatu commented 4 years ago

https://github.com/AlucardNosferatu/chatbot/blob/master/seqGanChatbot/gen_data/test.ids2500.answer https://raw.githubusercontent.com/AlucardNosferatu/chatbot/master/seqGanChatbot/gen_data/train.ids2500.answer 这里面看无论test还是train的id都是3,感觉词语矢量化是不是有些问题。。。?

zhaoyingjun commented 4 years ago

全部是3 说明词典文件是空的,UNK 对应的index是3,所以建议排查一下词典文件,看看是不是有乱码

AlucardNosferatu commented 4 years ago

我的词典文件和这个#56 情况一样 不知道为啥是空的