torch |
a Tensor library like NumPy, with strong GPU support |
torch.autograd |
a tape-based automatic differentiation library that supports all differentiable Tensor operations in torch |
torch.nn |
a neural networks library deeply integrated with autograd designed for maximum flexibility |
torch.multiprocessing |
Python multiprocessing, but with magical memory sharing of torch Tensors across processes. Useful for data loading and Hogwild training. |
torch.utils |
DataLoader, Trainer and other utility functions for convenience |
torch.legacy(.nn/.optim) |
legacy code that has been ported over from torch for backward compatibility reasons |
Usually one uses PyTorch either as:
- a replacement for NumPy to use the power of GPUs.
- a deep learning research platform that provides maximum flexibility and speed
Elaborating further:
### A GPU-Ready Tensor Library
If you use NumPy, then you have used Tensors (a.k.a ndarray).