pytorch introduction
Introduction to pytorch for neuroscientists and psychologists.
pytorch is a very useful package for nonlinear optimization, owing to its implementation of automatic differentiation and easy-to-use interface. However, almost all of the materials you can find online describing how tou se pytorch assume you're using it for deep learning or neural networks. But pytorch can do much more than that, so the goal of this introduction is to provide a gentle introduction to how to use pytorch for arbitrary optimization problems.
Requirements
This requires python 3.8 (because we use this new feature).
See requirements.txt
(you can install them with pip install -r requirements.txt
). You'll also need
jupyter if you wish to view the
notebook.
Note that pytorch is a huge package, and the way you install it will differ
depending on whether you have GPUs you want to use or not. The
website has more details on how to install it, if the
simple pip install
command above gives you trouble.