gpt4 book ai didi

torch - PyTorch 和 Torch 是什么关系?

转载 作者:行者123 更新时间:2023-12-03 10:16:18 28 4
gpt4 key购买 nike

有两个 PyTorch 存储库:

  • https://github.com/hughperkins/pytorch
  • https://github.com/pytorch/pytorch

  • 第一个显然需要 Torch 和 lua 并且是一个包装器,但第二个除了名称之外没有提及 Torch 项目。
    它与 Lua Torch 有什么关系? ?

    最佳答案

    这里是 pytorch 和 torch 的简短比较。
    手电筒:

    A Tensor library like numpy, unlike numpy it has strong GPU support.
    Lua is a wrapper for Torch (Yes! you need to have a good understanding of Lua), and for that you will need LuaRocks package manager.


    PyTorch:

    No need for the LuaRocks package manager, no need to write code in Lua. And because we are using Python, we can develop Deep Learning models with utmost flexibility. We can also exploit major Python packages likes scipy, numpy, matplotlib and Cython with PyTorch's own autograd.


    pytorch forum上对此有详细的讨论。 .除此之外,PyTorch 和 Torch 都使用 THNN . Torch 为 THNN 库提供 lua 包装器,而 Pytorch 为其提供 Python 包装器。
    PyTorch 的循环网络、权重共享和内存使用以及与 C 接口(interface)的灵 active 以及 Torch 的当前速度。
    有关更多见解,请查看此讨论会 here .

    关于torch - PyTorch 和 Torch 是什么关系?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44371560/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com