What is the relationship between PyTorch and Torch?

There are two PyTorch repositories:

The first explicitly requires Torch and lua and is a wrapper, but the second does not refer to the Torch project, except with its name.

How does this relate to the Lua torch ( http://torch.ch/ )?

+5
source share
1 answer

Here is a short comparison on pytorch and torch.

  • Torch:

    A tensor library such as Numpy, unlike Numpy, has powerful GPU support. Lua is a torch wrapper (yes, you need to understand Lua well), and for this you need the LuaRocks package manager.

  • Pytorch:

    There is no need for a LuaRocks package manager, no need to write code in Lua. And since we use Python, we can develop Deep Learning models with maximum flexibility. We can also use large python packages like scipy, numpy, matplotlib and Cython with our own autograph pytorch.

This is discussed in detail in the pytorch forum. Adding to the fact that PyTorch and Torch use THNN . The torch provides lua wrappers in the THNN library, while Pytorch provides Python wrappers for the same.

Pytorch recurring networks, weight distribution and memory usage with the flexibility of pairing with C and the current torch speed.

Update:

For more information, see this discussion session here.

+7
source

Source: https://habr.com/ru/post/1268558/


All Articles