PyTorch is a Python-based scientific computing package serving two broad purposes: A replacement for NumPy to use the power of GPUs and other accelerators.An automatic differentiation library that is useful to implement neural networks.