Here you will find the course exercises as well as the solutions. If you have any question or find any error please write me an email to otero@uni-bremen.de.
You need a google account for using Colab.
Go to https://colab.research.google.com.
Select the GITHUB tab (1) and type oterobaguer
(2). Then select the rtg-compact-course-2023
(3) repository (master branch) and select the 01_pytorch_intro
(4) notebook.
If you are using Git, then this happens automatically when you clone the repository, otherwise download a .zip file with the content of the repository and uncompress it. Be careful that you don't loose your own solutions when updating the folder!
For the exercises we are going to use Python (we recommend to use the Miniconda distribution).
The installer files for all platforms (Windows, Linux, Mac) can be found in:
https://docs.conda.io/en/latest/miniconda.html
Please download the installer and run it.
-
If your computer has a 64-bit operating system (most likely) select the 64-bit installer for Python 3.7.
-
If your system has a 32-bit operating system (unlikely) you will need to install the 32-bit installer for Python 3.7.
-
If you get asked if you want to add the Miniconda directory to the
PATH
select yes.
Confirm that you have successfully installed Miniconda by opening a console and typing conda
. If an error appears then Conda was not added to the PATH
. You have to search for the Anaconda Prompt terminal and open it. Then you have to change the directory the terminal is pointing to, using for example cd local_folder\local_folder2
, to the directory that contains the exercises.
-
Open a console on the folder where you have the repo and create a virtual environment by running
conda create --name myenv
. -
Activate the environment with the command
conda activate myenv
. -
The list of required packages is contained in the file requirements.txt. Install all of them by running the command
conda install --file requirements.txt
. -
Install
pytorch
. If you have a supported Nvidia GPU on our system go to https://pytorch.org/ and follow the instructions. Otherwise just runconda install pytorch torchvision -c pytorch
.
When everything is installed open a terminal on the exercises folder and run jupyter notebook
.
The jupter notebooks in the repository are designed to work in Google Colab, if you want to use them locally you might need to do some changes.
- Backpropagation video: https://www.youtube.com/watch?v=tIeHLnjs5U8
- https://playground.tensorflow.org/