Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions 01_materials/labs/lab_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,31 @@
"metadata": {},
"outputs": [],
"source": [
"## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n",
"import tensorflow as tf\n",
"\n",
"try:\n",
" # Disable all GPUs\n",
" tf.config.set_visible_devices([], 'GPU')\n",
"\n",
" visible_devices = tf.config.get_visible_devices()\n",
" for device in visible_devices:\n",
" assert device.device_type != 'GPU'\n",
" print(\"GPUs disabled, using CPU.\")\n",
"\n",
"except:\n",
" # Invalid device or cannot modify virtual devices once initialized.\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
Expand Down Expand Up @@ -813,7 +838,7 @@
"metadata": {
"file_extension": ".py",
"kernelspec": {
"display_name": ".venv",
"display_name": "deep-learning-env",
"language": "python",
"name": "python3"
},
Expand All @@ -827,7 +852,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.12"
"version": "3.11.14"
},
"mimetype": "text/x-python",
"name": "python",
Expand Down
23 changes: 23 additions & 0 deletions 01_materials/labs/lab_3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,29 @@
"We will download a subset of the dataset containing 100k ratings. There are tens of millions of ratings in the full dataset, spanning hundreds of thousands of users and movies. The subset we'll be using is a good example to demonstrate the concepts in this lab."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n",
"import tensorflow as tf\n",
"\n",
"try:\n",
" # Disable all GPUs\n",
" tf.config.set_visible_devices([], 'GPU')\n",
"\n",
" visible_devices = tf.config.get_visible_devices()\n",
" for device in visible_devices:\n",
" assert device.device_type != 'GPU'\n",
" print(\"GPUs disabled, using CPU.\")\n",
"\n",
"except:\n",
" # Invalid device or cannot modify virtual devices once initialized.\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
27 changes: 25 additions & 2 deletions 01_materials/labs/lab_4.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,29 @@
"We'll use the `skimage` library to read and process images. It's a library dedicated to image processing, which is part of the `scikit-learn` family."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n",
"import tensorflow as tf\n",
"\n",
"try:\n",
" # Disable all GPUs\n",
" tf.config.set_visible_devices([], 'GPU')\n",
"\n",
" visible_devices = tf.config.get_visible_devices()\n",
" for device in visible_devices:\n",
" assert device.device_type != 'GPU'\n",
" print(\"GPUs disabled, using CPU.\")\n",
"\n",
"except:\n",
" # Invalid device or cannot modify virtual devices once initialized.\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -718,7 +741,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "lab_1",
"display_name": "deep-learning-env",
"language": "python",
"name": "python3"
},
Expand All @@ -732,7 +755,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
"version": "3.11.14"
}
},
"nbformat": 4,
Expand Down
23 changes: 23 additions & 0 deletions 01_materials/labs/lab_5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@
"We will use the Pascal VOC 2007 dataset, which contains 20 classes of objects. We will only use 5 classes: \"dog\", \"cat\", \"bus\", \"car\", \"aeroplane\". To get started, we will use a pre-trained ResNet50 model to precompute the convolutional representations of the images. We will then build a simple model to predict the class and the bounding box of the object in the image."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n",
"import tensorflow as tf\n",
"\n",
"try:\n",
" # Disable all GPUs\n",
" tf.config.set_visible_devices([], 'GPU')\n",
"\n",
" visible_devices = tf.config.get_visible_devices()\n",
" for device in visible_devices:\n",
" assert device.device_type != 'GPU'\n",
" print(\"GPUs disabled, using CPU.\")\n",
"\n",
"except:\n",
" # Invalid device or cannot modify virtual devices once initialized.\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
23 changes: 23 additions & 0 deletions 01_materials/labs/lab_6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@
"- Use these pre-trained embeddings"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"## Tensorflow GPU disabled by default. Comment the following lines to enable GPU if you have a working CUDA installation.\n",
"import tensorflow as tf\n",
"\n",
"try:\n",
" # Disable all GPUs\n",
" tf.config.set_visible_devices([], 'GPU')\n",
"\n",
" visible_devices = tf.config.get_visible_devices()\n",
" for device in visible_devices:\n",
" assert device.device_type != 'GPU'\n",
" print(\"GPUs disabled, using CPU.\")\n",
"\n",
"except:\n",
" # Invalid device or cannot modify virtual devices once initialized.\n",
" pass"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
[project]
name = "deep-learning-env"
version = "0.1.0"
version = "0.1.2"
requires-python = ">=3.11"
dependencies = [
"ipykernel>=6.30.1",
"h5py>=3.14.0",
"ipython>=9.5.0",
"keras>=3.11.3",
"matplotlib>=3.10.6",
"umap-learn==0.5.7",
"numpy>=2.3.3",
"plotly>=6.3.0",
"scikit-image>=0.25.2",
"scikit-learn>=1.7.2",
"scikit-learn>=1.6.0,<1.7",
"seaborn>=0.13.2",
"sequence>=0.8.0",
"tensorflow>=2.20.0",
"torch>=2.8.0",
"torchvision>=0.23.0",
"umap>=0.1.1",
"llvmlite>=0.45.0",
"transformers>=4.51.0",
"accelerate>=1.6.0",
"jupyter>=1.1.1",
"jupyterlab>=4.3.0"
]