lc222 / seq2seq_chatbot

基于seq2seq模型的简单对话系统的tf实现,具有embedding、attention、beam_search等功能,数据集是Cornell Movie Dialogs
330 stars 100 forks source link

当目标序列长度大于10的时候,怎么样让它变成10呢? #4

Closed parahaoer closed 6 years ago

parahaoer commented 6 years ago

batch.decoderSeqs[i] = batch.decoderSeqs[i] + [padToken] (en_de_seq_len[1] - len(batch.decoderSeqs[i])) batch.targetSeqs[i] = batch.targetSeqs[i] + [padToken] (en_de_seq_len[1] - len(batch.targetSeqs[i]))