Repository for sharing lab projects of Universitat Pompeu Fabra (UPF) Deep Learning course.
It is very recommended to use a python virtual environment for all the labs of the subject. There are 2 recommended environments for doing so, miniconda or venv. Below you can find the steps for venv environments.
It is recommended to use Python 3.10, since Python 3.11 is not properly supported by all libraries yet. You can check your python version with python --version or python3 --version.
- First open a terminal in the labs folder and create a virtual environment:
python3 -m venv .venv- Then activate the environment. From now on everything that we install will remain inside the
.venvfolder, without polluting the user installation.
source .venv/bin/activate- You can now start working normally! Remember to select the python interpreter appripriately. You can do so in Visual Studio Code using the toolbar for
.pyfiles:
Or using the Select Kernel option for Jupyter Notebooks:
- It is recommended to install some basic DL packages as well:
The recommended approach is to use the requirements.txt file to install all dependencies:
python -m pip install --upgrade -r requirements.txtYou can also install them manually as follows:
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy pandas matplotlib ipympl opencv-python torch ipykernel sklearnTo install tensorflow, you can follow the instructions here.

