知识卡片
计时总量需还原到单次调用
41531×384约1595万个坐标,点积计算还分别包含乘法与加法。若timeit用number=20,总耗时0.106秒对应每次约0.0053秒;估吞吐必须同时说明调用次数、批量大小、硬件和缓存,不能把总耗时当单次再换算。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
It took a little more than 100 milliseconds to perform 3.2 million multiplications and additions. A total of 41,531 × 384 (1.6 million) multiplications are required to multiply the elements of the 384D vector by the elements of the 41,531 sentence vectors. And you need nearly that same number of additions (1.6 million) to add up all those 384 products for each of the 41,531
参考来源
- 位置:《Natural Language Processing in Action, Second Edition》第03章《词频与逆文档频率向量》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-3.html)
- 结论依据:摘录中关于计时总量需还原到单次调用的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:It took a little more than 100 milliseconds to perform 3.2 million multiplications and additions. A total of 41,531 × 384 (1.6 million) multiplications are required to multiply the elements of the 384D vector by the elements of the 41,531 sentence vectors. And you need nearly that same number of additions (1.6 million) to add up all those 384 products for each of the 41,531