Skip to content

Commit

Permalink
Merge pull request #444 from carpentries-incubator/small-fixes-review
Browse files Browse the repository at this point in the history
Small fixes from Carpentries Lab review
  • Loading branch information
dsmits authored Feb 27, 2024
2 parents 9841f28 + 8d9c044 commit 9895279
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 72 deletions.
50 changes: 25 additions & 25 deletions episodes/1-introduction.Rmd
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
title: 'Introduction'
teaching: 40
exercises: 15
teaching: 50
exercises: 30
---

:::::::::::::::::::::::::::::::::::::: questions

- "What is Deep Learning?"
- "When does it make sense to use and not use Deep Learning?"
- "When is it successful?"
- "What are the tools involved?"
- "What is the workflow for Deep Learning?"
- "Why did we choose to use Keras in this lesson?"
- "How do neural networks learn?"
- What is Deep Learning?
- When does it make sense to use and not use Deep Learning?
- When is it successful?
- What are the tools involved?
- What is the workflow for Deep Learning?
- Why did we choose to use Keras in this lesson?
- How do neural networks learn?

::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::::::: objectives

- "Recall the sort of problems for which Deep Learning is a useful tool"
- "List some of the available tools for Deep Learning"
- "Recall the steps of a Deep Learning workflow"
- "Identify the inputs and outputs of a deep neural network."
- "Explain the operations performed in a single neuron"
- "Test that you have correctly installed the Keras, Seaborn and Sklearn libraries"
- "Describe what a loss function is"
- Recall the sort of problems for which Deep Learning is a useful tool
- List some of the available tools for Deep Learning
- Recall the steps of a Deep Learning workflow
- Identify the inputs and outputs of a deep neural network.
- Explain the operations performed in a single neuron
- Test that you have correctly installed the Keras, Seaborn and Sklearn libraries
- Describe what a loss function is

::::::::::::::::::::::::::::::::::::::::::::::::

Expand Down Expand Up @@ -217,7 +217,7 @@ A more complicated and less used loss function for regression is the [Huber loss
Below you see the Huber loss (green, delta = 1) and Squared error loss (blue)
as a function of `y_true - y_pred`.

![](fig/01_huber_loss.png){alt='Line plot comparing squared error loss function with the Huber loss function where delta = 1, showing the cost of prediction error of both functions equal where y_true - y_pred is between -1 and 1, then rising linearly with the Huber loss function as y_true diverges further from y_pred, as opposed to expontentially for the squared error function.',' width='400px'}
![](fig/01_huber_loss.png){alt='Line plot comparing squared error loss function with the Huber loss function where delta = 1, showing the cost of prediction error of both functions equal where y_true - y_pred is between -1 and 1, then rising linearly with the Huber loss function as y_true diverges further from y_pred, as opposed to expontentially for the squared error function.' width='400px'}

Which loss function is more sensitive to outliers?

Expand Down Expand Up @@ -461,13 +461,13 @@ You should get a version number reported. At the time of writing 1.2.2 is the la

:::::::::::::::::::::::::::::::::::::: keypoints

- "Machine learning is the process where computers learn to recognise patterns of data."
- "Artificial neural networks are a machine learning technique based on a model inspired by groups of neurons in the brain."
- "Artificial neural networks can be trained on example data."
- "Deep Learning is a machine learning technique based on using many artificial neurons arranged in layers."
- "Neural networks learn by minimizing a loss function."
- "Deep Learning is well suited to classification and prediction problems such as image recognition."
- "To use Deep Learning effectively we need to go through a workflow of: defining the problem, identifying inputs and outputs, preparing data, choosing the type of network, choosing a loss function, training the model, refine the model, measuring performance before we can classify data."
- "Keras is a Deep Learning library that is easier to use than many of the alternatives such as TensorFlow and PyTorch."
- Machine learning is the process where computers learn to recognise patterns of data.
- Artificial neural networks are a machine learning technique based on a model inspired by groups of neurons in the brain.
- Artificial neural networks can be trained on example data.
- Deep Learning is a machine learning technique based on using many artificial neurons arranged in layers.
- Neural networks learn by minimizing a loss function.
- Deep Learning is well suited to classification and prediction problems such as image recognition.
- To use Deep Learning effectively we need to go through a workflow of: defining the problem, identifying inputs and outputs, preparing data, choosing the type of network, choosing a loss function, training the model, refine the model, measuring performance before we can classify data.
- Keras is a Deep Learning library that is easier to use than many of the alternatives such as TensorFlow and PyTorch.

::::::::::::::::::::::::::::::::::::::::::::::::
26 changes: 13 additions & 13 deletions episodes/2-keras.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ exercises: 50
---

::: questions
- "What is a neural network?"
- "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?"
- What is a neural network?
- 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?
:::

::: objectives
- "Use the deep learning workflow to structure the notebook"
- "Explore the dataset using pandas and seaborn"
- "Use one-hot encoding to prepare data for classification in Keras"
- "Describe a fully connected layer"
- "Implement a fully connected layer with Keras"
- "Use Keras to train a small fully connected network on prepared data"
- "Interpret the loss curve of the training process"
- "Use a confusion matrix to measure the trained networks' performance on a test set"
- Use the deep learning workflow to structure the notebook
- Explore the dataset using pandas and seaborn
- Use one-hot encoding to prepare data for classification in Keras
- Describe a fully connected layer
- Implement a fully connected layer with Keras
- Use Keras to train a small fully connected network on prepared data
- Interpret the loss curve of the training process
- Use a confusion matrix to measure the trained networks' performance on a test set
:::


Expand Down
30 changes: 15 additions & 15 deletions episodes/3-monitor-the-model.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ exercises: 80
---

::: questions
- "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?"
- 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?
:::

::: objectives
- "Explain the importance of keeping your test set clean, by validating on the validation set instead of the test set"
- "Use the data splits to plot the training process"
- "Explain how optimization works"
- "Design a neural network for a regression task"
- "Measure the performance of your deep neural network"
- "Interpret the training plots to recognize overfitting"
- "Use normalization as preparation step for Deep Learning"
- "Implement basic strategies to prevent overfitting"
- Explain the importance of keeping your test set clean, by validating on the validation set instead of the test set
- Use the data splits to plot the training process
- Explain how optimization works
- Design a neural network for a regression task
- Measure the performance of your deep neural network
- Interpret the training plots to recognize overfitting
- Use normalization as preparation step for Deep Learning
- Implement basic strategies to prevent overfitting
:::

::: instructor
Expand Down Expand Up @@ -990,6 +990,6 @@ This will turn the data into time series data which in turn might also make it w


::: keypoints
- "Separate training, validation, and test sets allows monitoring and evaluating your model."
- "Batchnormalization scales the data as part of the model."
- Separate training, validation, and test sets allows monitoring and evaluating your model.
- Batchnormalization scales the data as part of the model.
:::
20 changes: 10 additions & 10 deletions episodes/4-advanced-layer-types.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ exercises: 70
---

::: questions
- "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?"
- 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?
:::

::: objectives
- "Understand why convolutional and pooling layers are useful for image data"
- "Implement a convolutional neural network on an image dataset"
- "Use a drop-out layer to prevent overfitting"
- Understand why convolutional and pooling layers are useful for image data
- Implement a convolutional neural network on an image dataset
- Use a drop-out layer to prevent overfitting
:::


Expand Down Expand Up @@ -793,7 +793,7 @@ model.save('cnn_model')
```

::: keypoints
- "Convolutional layers make efficient reuse of model parameters."
- "Pooling layers decrease the resolution of your input"
- "Dropout is a way to prevent overfitting"
- Convolutional layers make efficient reuse of model parameters.
- Pooling layers decrease the resolution of your input
- Dropout is a way to prevent overfitting
:::
18 changes: 9 additions & 9 deletions episodes/5-outlook.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ exercises: 15
---

::: questions
- "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?"
- 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?
:::

::: objectives
- "Understand that what we learned in this course can be applied to real-world problems"
- "Use best practices for organising a deep learning project"
- "Identify next steps to take after this course"
- Understand that what we learned in this course can be applied to real-world problems
- Use best practices for organising a deep learning project
- Identify next steps to take after this course
:::

You have come to the end of this course.
Expand Down Expand Up @@ -155,7 +155,7 @@ Tensorflow/Keras will automatically detect and use a GPU if it is available on y
A simple and quick way to get access to a GPU is to use [Google Colab](https://colab.google/)

::: keypoints
- "Although the data preparation and model architectures are somewhat more complex,
what we have learned in this course can directly be applied to real-world problems"
- "Use what you have learned in this course as a basis for your own learning trajectory in the world of deep learning"
- Although the data preparation and model architectures are somewhat more complex,
what we have learned in this course can directly be applied to real-world problems
- Use what you have learned in this course as a basis for your own learning trajectory in the world of deep learning
:::

0 comments on commit 9895279

Please sign in to comment.