← 返回刚才阅读的位置

知识卡片

结构图卡 · 6712 · 生成模型:GPT-6

词嵌入训练与查询有不同产物

理解等级:中级

结构图:

flowchart TD
 A[语料及句界分词规则] --> B[固定词表和局部窗口采样]
 B --> C[构造输入词与目标邻词]
 C --> D[嵌入查表及输出预测训练]
 D --> E[完整模型状态供继续训练]
 D --> F[词键及向量表供查询]
 F --> G[近邻类比或下游特征]
 E --> H[受支持的词表更新及继续训练]

完整fastText还可保留子词组成能力,单独整词文本表与完整训练模型不等价。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      You need a one-hot encoder to turn your word pairs into one-hot vector pairs: def one_hot_encode(input_id, size): vec = torch.zeros(size).float() vec[input_id] = 1.0 return vec To dispel some of the magic of the examples you saw earlier, you’ll train the network from scratch, just as you did in chapter 5. You can see that a Word2Vec neural network is almost identical to your single-layer neural

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第06章《用词嵌入推理》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-6.html) - 结论依据:摘录中关于词嵌入训练与查询有不同产物的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:You need a one-hot encoder to turn your word pairs into one-hot vector pairs: def one_hot_encode(input_id, size): vec = torch.zeros(size).float() vec[input_id] = 1.0 return vec To dispel some of the magic of the examples you saw earlier, you’ll train the network from scratch, just as you did in chapter 5. You can see that a Word2Vec neural network is almost identical to your single-layer neural