Bayesian Linear Regression with SGD, Adam and NUTS in PyTorch

Jake Jing
4 min readJul 18, 2020

PyTorch has gained great popularity among industrial and scientific projects, and it provides a backend for many other packages or modules. It is also accompanied with very good documentation, tutorials, and conferences. This blog attempts to use PyTorch to fit a simple linear regression via three optimisation algorithms:

  • Stochastic Gradient Descent (SGD)

--

--