Code accompanying the Machine and Deep Learning Lectures. Last updated: Winter Semester 2025/2026.
This repository uses:
- the Data Science Stack (NumPy, Pandas, Matplotlib, etc.)
- Keras 3 with PyTorch and/or JAX as backend
- uv as the package/environment manager (a much faster, modern
alternative to plain
pip) 🚀🚀🚀
To test the
We call it htwg_dl_25 and use uv to create it right inside the repository:
uv venv htwg_dl_25source htwg_dl_25/bin/activateuv pip install numpy scipy pandas matplotlib seaborn tqdm scikit-learn jupyterlab ipykerneluv pip install "keras>=3.0"Keras 3 is backend-agnostic and can run on top of PyTorch or JAX or TensorFlow (not recommended anymore). You select the backend in your code before importing Keras via:
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax"
import kerasuv pip install torch torchvision torchaudioFor CUDA-enabled Linux machines, follow the official instructions on the PyTorch website.
For non-Apple-Silicon platforms (or Intel Macs):
uv pip install jax jaxlibFor CUDA-enabled JAX on Linux, follow the official JAX installation guide.
It's worth considering uv as our environment and package manager because it is fast, lightweight, and fully compatible with standard Python workflows. It uses a global package cache, so packages are downloaded and built only once, and subsequent environments simply link to them. This saves both installation time and disk space.
Conceptually, you can think of uv as:
- a drop-in replacement for pip (you just prefix commands with
uv) - faster (Rust-based, with global caching)
- more reliable (modern dependency resolver)
- using standard Python venvs instead of a separate ecosystem like conda
Example:
pip install numpy→uv pip install numpypython -m venv env→uv venv env#create a virtual environment
Everything else works the same — just faster and cleaner.