知识卡片
归一化向量不等于删除训练输出层
init_sims(replace=True)的历史接口主要与预计算并替换归一化向量有关,不能当通用丢弃输出权重命令。若只需查询,可另存KeyedVectors并放弃完整模型;若要继续训练,则保存完整状态,避免混淆两种目的。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 用词嵌入推理
原书出处 · 1 处
- · 查看原书依据
In addition, word2vec models can consume quite a bit of memory. But remember that only the weight matrix for the hidden layer is of interest. Once you’ve trained your word model, you can reduce the memory footprint by about half if you freeze your model and discard the unnecessary information. The following command will discard the unneeded output weights of your neural network:
参考来源
- 位置:《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)
- 结论依据:摘录中关于归一化向量不等于删除训练输出层的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:In addition, word2vec models can consume quite a bit of memory. But remember that only the weight matrix for the hidden layer is of interest. Once you’ve trained your word model, you can reduce the memory footprint by about half if you freeze your model and discard the unnecessary information. The following command will discard the unneeded output weights of your neural network: