I am giving these lectures from IPython Notebooks. I strongly suggest you open them up and play with them yourself!
The easiest approach to getting the notebooks working is by uploading them to Google Colab. You can either download the notebook, and upload it. Or you can even load it directly from GitHub by going to "GitHub" instead of "Upload", and pasting in a link to the notebook, e.g.https://github.com/LaurenceA/intro_lectures/blob/master/Lecture_1.ipynb
Note that you may have to delete the
%matplotlib widgetline in the first code block in Google Colab.
If you want to get the notebooks running locally, I advise that you start by installing Anaconda Python distribution, which is available on all operating systems, and comes with all the major numerical programming libraries.In addition, you need to install PyTorch,
conda install pytorch torchvision -c pytorchTo get %matplotlib widget working, you also need to install jupyter-matplotlib, using
conda install -c conda-forge ipympl
# If using the Notebook
conda install -c conda-forge widgetsnbextension
# If using JupyterLab
conda install nodejs
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install jupyter-matplotlibYou should install the dependencies in a new conda environment.
# Load anaconda
module load anaconda/2020.07
# Create new environment and activate
conda create -n notebooks
source activate notebooks
# Install Dependencies
conda install pytorch cpuonly -c pytorch
conda install -c conda-forge jupyterlab
conda install matplotlib
conda install -c conda-forge ipympl
# Reactivate environment before running a notebook
source deactivate
source activate notebooks