These are the updated versions of notebooks used in the PyTorch Beginner Series YouTube playlist, created by Brad Heintz.
| Title | Video | Notebook | |
|---|---|---|---|
| 1 | Introduction to PyTorch | + | + |
| 2 | Introduction to PyTorch Tensors | + | + |
| 3 | The Fundamentals of Autograd | + | + |
| 4 | Building Models with PyTorch | + | + |
| 5 | PyTorch TensorBoard Support | + | + |
| 6 | Training with PyTorch | + | + |
| 7 | Model Understanding with Captum | + | + |
| 8 | Production Inference Deployment with PyTorch | + | + |
Follow one of the methods below to set up everything and install all necessary dependencies.
- Install
miniconda(oranaconda).
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
conda config --set auto_activate_base false- Change the solver to speed up the process of installing new packages.
conda update -n base conda
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda config --add channels conda-forge- Create a new
condaenvironment.
conda create -n ai -y- Install essential packages.
conda install -c conda-forge -n ai jupyterlab numpy matplotlib -y
conda install -c pytorch -c nvidia -n ai pytorch torchvision torchaudio pytorch-cuda=12.1 -yReplace 12.1 with your cuda version extracted from the nvidia-smi output.
- Install
TensorBoard.
conda install -c conda-forge -n ai tensorboard -yIf you encounter any problems due to incompatibility with the latest NumPy version, run the following commands instead:
conda activate ai
pip3 install tb-nightly- Install
captum.
conda install -c pytorch -n ai captum -y
pip install --upgrade --quiet jupyter_client ipywidgets
conda install -c conda-forge -n ai flask flask-compress- Export installed packages for further use.
conda activate ai
conda env export > environment.yml
pip3 freeze > requirements.txtconda env create -f environment.yml
conda activate ai
pip3 install -r requirements.txt