Introduction
PyTorch is the most widely used deep-learning library in research and industry. Almost everything in it rests on two ideas:
- Tensors — multi-dimensional arrays of numbers, like NumPy arrays, but able to run on GPUs;
- Autograd — PyTorch watches every operation you do on tensors and can automatically compute gradients, which is exactly what training needs.
If NumPy is a calculator, PyTorch is a calculator that can also tell you, for every number you typed in, how much it affected the final answer.