Summary and Schedule
Welcome
This is a hands-on introduction to the first steps in deep learning, intended for researchers who are familiar with (non-deep) machine learning.
The use of deep learning has seen a sharp increase of popularity and applicability over the last decade. While deep learning can be a useful tool for researchers from a wide range of domains, taking the first steps in the world of deep learning can be somewhat intimidating. This introduction aims to cover the basics of deep learning in a practical and hands-on manner, so that upon completion, you will be able to train your first neural network and understand what next steps to take to improve the model.
We start with explaining the basic concepts of neural networks, and then go through the different steps of a deep learning workflow. Learners will learn how to prepare data for deep learning, how to implement a basic deep learning model in Python with Keras, how to monitor and troubleshoot the training process and how to implement different layer types such as convolutional layers.
Prerequisites
Learners are expected to have the following knowledge:
- Basic Python programming skills and familiarity with the Pandas package.
- Basic knowledge on machine learning, including the following concepts: Data cleaning, train & test split, type of problems (regression, classification), overfitting & underfitting, metrics (accuracy, recall, etc.).
Do you want to teach this lesson? Find more help in the README Feel free to reach out to us with any questions that you have. Just open a new issue. We also value any feedback on the lesson!
Episode 2, 3, and 4 in this lesson are relatively long. We suggest to have a break at least every 90 minutes and to switch the instructor regularly, also within episodes. We have added reminders to the longer episodes with suggestions for when to have a switch and/or a break.
There is an example schedule with breaks that can be adapted to how you want to teach the lesson.
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Introduction |
What is deep learning? What is a neural network? Which operations are performed by a single neuron? How do neural networks learn? When does it make sense to use and not use deep learning? What are tools involved in deep learning? What is the workflow for deep learning? Why did we choose to use Keras in this lesson? |
Duration: 01h 20m | 2. Classification by a neural network using Keras |
How do I compose a neural network using Keras? How do I train this network on a dataset? How do I get insight into learning process? How do I measure the performance of the network? ::: |
Duration: 03h 10m | 3. Monitor the training process |
How do I create a neural network for a regression task? How does optimization work? How do I monitor the training process? How do I detect (and avoid) overfitting? What are common options to improve the model performance? ::: |
Duration: 06h 30m | 4. Advanced layer types |
Why do we need different types of layers? What are good network designs for image data? What is a convolutional layer? How can we use different types of layers to prevent overfitting? What is hyperparameter tuning? ::: |
Duration: 08h 50m | 5. Transfer learning |
How do I apply a pre-trained model to my data? ::: |
Duration: 09h 40m | 6. Outlook |
How does what I learned in this course translate to real-world
problems? How do I organise a deep learning project? What are next steps to take after this course? ::: |
Duration: 10h 20m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Software Setup
Installing Python
Python is a popular language for scientific computing, and a frequent choice for machine learning as well. To install Python, follow the Beginner’s Guide or head straight to the download page.
Please set up your python environment at least a day in advance of the workshop. If you encounter problems with the installation procedure, ask your workshop organizers via e-mail for assistance so you are ready to go as soon as the workshop begins.
Installing the required packages
Pip is the package management system built into Python. Pip should be available in your system once you installed Python successfully.
Open a terminal (Mac/Linux) or Command Prompt (Windows) and run the following commands.
- Create a virtual
environment called
dl_workshop
:
python3 -m venv dl_workshop
py -m venv dl_workshop
- Activate the newly created virtual environment:
source dl_workshop/bin/activate
dl_workshop\Scripts\activate
Remember that you need to activate your environment every time you restart your terminal!
- Install the required packages:
python3 -m pip install jupyter seaborn scikit-learn pandas tensorflow
Recent Macs have special chips (M1/M2/M3) that can accelerate deep learning processes. Apple has developed the tensorflow-metal package to support these chips in TensorFlow. This is not supported by the standard TensorFlow installation, and not required for this lesson.
Nevertheless, you can install the on top of the standard
tensorflow
:
python -m pip install tensorflow-metal
py -m pip install jupyter seaborn scikit-learn pandas tensorflow
Note: Tensorflow makes Keras available as a module too.
Starting Jupyter Lab
We will teach using Python in Jupyter Lab, a programming environment that runs in a web browser. Jupyter Lab is compatible with Firefox, Chrome, Safari and Chromium-based browsers. Note that Internet Explorer and Edge are not supported. See the Jupyter Lab documentation for an up-to-date list of supported browsers.
To start Jupyter Lab, open a terminal (Mac/Linux) or Command Prompt (Windows) and type the command:
jupyter lab
To start the Python interpreter without Jupyter Lab, open a terminal (Mac/Linux) or Command Prompt (Windows) and type the command:
python
Check your setup
To check whether all packages installed correctly, start a jupyter notebook in jupyter lab as explained above. Run the following lines of code:
PYTHON
import sklearn
print('sklearn version: ', sklearn.__version__)
import seaborn
print('seaborn version: ', seaborn.__version__)
import pandas
print('pandas version: ', pandas.__version__)
import tensorflow
print('Tensorflow version: ', tensorflow.__version__)
This should output the versions of all required packages without giving errors. Most versions will work fine with this lesson, but: - For Keras and Tensorflow, the minimum version is 2.12.0 - For sklearn, the minimum version is 1.2.2
Fallback option: cloud environment
If a local installation does not work for you, it is also possible to run this lesson in Binder Hub. This should give you an environment with all the required software and data to run this lesson, nothing which is saved will be stored, please copy any files you want to keep. Note that if you are the first person to launch this in the last few days it can take several minutes to startup. The second person who loads it should find it loads in under a minute. Instructors who intend to use this option should start it themselves shortly before the workshop begins.
Alternatively you can use Google colab. If you open a jupyter notebook here, the required packages are already pre-installed. Note that google colab uses jupyter notebook instead of Jupyter Lab.
Downloading the required datasets
Download the weather dataset prediction csv and Dollar street dataset (4 files in total)