Geavanceerd
Zoeken inSamenvattingen
Zo zoek je
  • Woorden vinden lestitels, tekst en code. Filter op soort (gidsen, cursussen, programma's, boeken) of blijf in dit boek.
  • book:rhcsa en ch:8 maken de zoektocht kleiner; #code vindt een woord alleen in commando's van de lessen.
  • "twee woorden" vindt precies die zin.
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken
Probeer:

Cursus 2Naam in de cursus: Introduction to Deep Learning & Neural Networks with Keras

Introduction to Deep Learning and Neural Networks with Keras

Course 2 of 13 in the IBM AI Engineering certificate. What deep learning is and where people use it.

Course page: Coursera

  • 9 Lessen
  • 0 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

2.1

What the course covers

What deep learning is and where people use it.

  • How a neuron and an artificial neural network work.
  • Forward propagation, gradient descent and backpropagation.
  • The vanishing gradient problem and activation functions.
  • How to build regression and classification models with Keras.
  • CNNs, RNNs, transformers, autoencoders and pretrained models.
ModuleMain focus
Module 1 · about 1 hourIntroduction to Deep Learning and Neural Networks: neurons, ANN, forward propagation
Module 2 · about 2 hoursBasics of Deep Learning: gradient descent, backpropagation, vanishing gradient, activation functions
Module 3 · about 2 hoursKeras and Deep Learning Libraries: regression and classification models with Keras
Module 4 · about 3 hoursDeep Learning Models: shallow vs deep, CNNs, RNNs, transformers, autoencoders, pretrained models
Module 5 · about 2 hoursFinal Project and Course Wrap-Up: final project and final assessment

2.2

Module 1: Introduction to Deep Learning and Neural Networks

Introduction to Deep Learning and Neural Networks: neurons, ANN, forward propagation.

  • Deep learning is machine learning with many-layer neural networks.
  • A neuron takes inputs, multiplies them by weights, adds a bias and applies an activation function.
  • A neural network has an input layer, hidden layers and an output layer.
  • Forward propagation moves data from input to output to make a prediction.
  • A dense layer connects every neuron to every neuron in the next layer.
  • Deep learning needs a lot of data and compute. It is not always the best choice.

2.3

Module 2: Basics of Deep Learning

Basics of Deep Learning: gradient descent, backpropagation, vanishing gradient, activation functions.

  • A loss function measures how wrong the model is.
  • Gradient descent changes the weights to make the loss smaller.
  • The learning rate controls the step size. Too big: the model jumps. Too small: slow training.
  • Backpropagation sends the error backward and computes the gradients.
  • Epoch = one full pass over the training data. Batch size = rows in one update.
  • Vanishing gradient: the gradients become very small, so early layers learn slowly.
  • Activation functions: sigmoid (0 to 1), tanh (-1 to 1) and ReLU (max(0, x)). ReLU helps with the vanishing gradient.
  • Softmax turns scores into probabilities for many classes.

2.4

Module 3: Keras and Deep Learning Libraries

Keras and Deep Learning Libraries: regression and classification models with Keras.

  • Keras is a high-level API for building neural networks. It runs on TensorFlow.
  • Build a model with Sequential() and add layers in order.
  • compile() sets the optimizer, the loss and the metrics.
  • fit() trains the model. evaluate() tests it. predict() makes new outputs.
  • Regression predicts a number. Classification predicts a class.
  • Use cross-entropy loss for classification and mean squared error for regression.
  • Overfitting: good score on training data, weak score on new data. Watch the validation loss.
  • Dropout and early stopping help reduce overfitting.

2.5

Module 4: Deep Learning Models

Deep Learning Models: shallow vs deep, CNNs, RNNs, transformers, autoencoders, pretrained models.

  • A shallow network has few layers. A deep network has many layers.
  • A CNN is good for images. It uses convolution and pooling.
  • An RNN is good for sequences: text, speech and time series. LSTM and GRU remember longer patterns.
  • A transformer uses attention and handles long sequences well.
  • An autoencoder rebuilds its input through a small bottleneck. It is used for compression and denoising.
  • A pretrained model is trained before on big data. Transfer learning reuses it for a new task.

2.6

Module 5: Final Project and Course Wrap-Up

Final Project and Course Wrap-Up: final project and final assessment.

  • The final project uses the full workflow: load data, scale it, build, compile, fit and evaluate.
  • Report the loss and the metrics, not only the accuracy. Test on data the model did not see.

2.7

Check yourself

Answer each question first, then open it to check the answer.

1What is deep learning? a) Machine learning with many-layer neural networks · b) A database tool · c) A chart library · d) A type of resume

a) Machine learning with many-layer neural networks. Deep learning uses neural networks with many layers.

2What does a neuron do with its inputs? a) Deletes them · b) Multiplies them by weights, adds a bias and applies an activation · c) Stores them in a table · d) Prints them

b) Multiplies them by weights, adds a bias and applies an activation. Weights, bias and an activation function are the three steps.

3What is forward propagation? a) Moving data from input to output to make a prediction · b) Sending the error backward · c) Saving the model to disk · d) Cleaning the data

a) Moving data from input to output to make a prediction. Data moves forward through the network to the output.

4What does gradient descent do? a) Adds more layers · b) Changes the weights to make the loss smaller · c) Splits the data · d) Removes the bias

b) Changes the weights to make the loss smaller. The weights move in the direction that lowers the loss.

5What is an epoch? a) One full pass over the training data · b) One neuron · c) One layer · d) One file

a) One full pass over the training data. An epoch is one full pass over the training data.

6What is the vanishing gradient problem? a) The gradients become very small, so early layers learn slowly · b) The data has no labels · c) The model has no output · d) The GPU is too fast

a) The gradients become very small, so early layers learn slowly. Small gradients make the early layers learn very slowly.

7Which activation helps with the vanishing gradient problem? a) Sigmoid · b) ReLU · c) Step · d) Linear

b) ReLU. ReLU does not shrink the gradient for positive values.

8Which loss is common for binary classification? a) Mean absolute error · b) Binary cross-entropy · c) Mean squared error · d) Poisson loss

b) Binary cross-entropy. Binary cross-entropy fits two classes.

9Which Keras call sets the optimizer and the loss? a) fit() · b) compile() · c) predict() · d) summary()

b) compile(). compile() sets the optimizer, the loss and the metrics.

10What is overfitting? a) A good score on training data and a weak score on new data · b) A very fast GPU · c) A missing column · d) A very large batch

a) A good score on training data and a weak score on new data. The model learns the training data too well and does not generalize.

11What is transfer learning? a) Moving a file to a new folder · b) Reusing a pretrained model for a new task · c) Copying the test set into the training set · d) Changing the learning rate by hand

b) Reusing a pretrained model for a new task. Transfer learning starts from a model that already learned useful features.

2.8

Study and exam tips

Learn the order of the steps: build, compile, fit, evaluate, predict.

  • Match the loss to the task: cross-entropy for classes, MSE for numbers.
  • Remember that ReLU helps with the vanishing gradient.
  • Know one use for each model: CNN for images, RNN for sequences, transformer for long text.
  • Check the validation loss to spot overfitting.