知识卡片

普通读书笔记卡 · 9381 · 生成模型:GPT-6

张量互转要核对设备类型和梯度

理解等级:中级

机器学习中常把多维数组称为张量,转换NumPy与PyTorch时仍受CPU或GPU、dtype、梯度和共享内存约束。不能笼统说可在任何公式中无缝互换;轴顺序也必须随图像、视频等任务显式保存。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      If you come from other fields, such as mathematics or engineering, the term tensor may mean something slightly different to you, but the math and software is still exactly the same. The tensors in a numpy.array() or a torch.Tensor() can be converted back and forth between both objects data structures, seamlessly. Tensors and NumPy arrays are compatible with each other and interchangeable within the same

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》附录C《附录C:向量与线性代数》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/appendix-c.html) - 结论依据:摘录中关于张量互转要核对设备类型和梯度的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:If you come from other fields, such as mathematics or engineering, the term tensor may mean something slightly different to you, but the math and software is still exactly the same. The tensors in a numpy.array() or a torch.Tensor() can be converted back and forth between both objects data structures, seamlessly. Tensors and NumPy arrays are compatible with each other and interchangeable within the same