Pytorch Tutorial

Most of the content here is from the Official Pytorch tutorial. I made this to be more concise and to present to a class. You can get the notebook here. PyTorch Background Data in PyTorch is stored in Tensors, which are almost identical to NumPy arrays. Their key differences are Auto gradient calculation (with torch.autograd) Ability to move to a GPU (with Tensor.to(device)) import torch data = [[1,2,3], [4,5,6], [7,8,9]] data_tensor = torch....

November 16, 2022 · Jakob Johnson

Python Management with Pyenv

Why use Pyenv? Python virtual environments have been a useful way of managing python packages and package versions for quite a while. With vanilla Python, virtualenv is available, and for more complex cases Anaconda is a popular choice. Using these keeps your system installation of Python free of unnessecary clutter and packages as well as making it really easy to share dependencies with pip freeze. But what if some of the packages you wanted to install aren’t avaliable for your system’s installation of Python?...

August 17, 2022 · Jakob Johnson