关于输入和输出
andongBlue opened this issue · 1 comments
andongBlue commented
①知道了输入的x_file和y_flie是文本统计的ID,我想请问输入ID后是如何Embedding的呢?我一直没有找到。
②还想问一下,Embedding之后是词向量,将这个词向量输入到网络中,那么输出是什么呢?
③如果网络的输出是词向量,我如何再转化为文字呢?
④源代码中的table.npy这个表格是什么呢?--猜测是用来押韵的表格,不知道对不对
希望你的再次解答~谢谢
TobiasLee commented
抱歉才看到这个 issue:
- id 经过 embedding_lookup 进行 embedding
- 输出是词表上的概率分布 [vocabulary_size]
- 根据概率分布采样或者取最大概率可以得到对应的词的 idx,再根据 idx2word 转换成词就行
- 是的,是预处理好的押韵表格