• 8 hours
  • Hard

Free online content available in this course.

course.header.alt.is_certifying

Got it!

Last updated on 3/8/23

Train a Basic Deep Learning Model

Evaluated skills

  • Train simple deep learning models

Description

In this quiz, you will be building a classifier on the Iris dataset! If you haven’t heard about it before, the Iris dataset is one that contains information about three types of the iris flower:

  • Iris-setosa
  • Iris-versicolor
  • Iris-virginica

The three types are differentiated by:

  • Sepal length
  • Sepal width
  • Petal length
  • Petal width

Here’s a snippet of the dataset:

Snippet of the Iris Dataset. Ids: 147, 62, 146, 12, 135, 89, 119, 64, 14, 95.

And this is what it looks like when the sepal length is drawn against the sepal width:

Graph of sepal length drawn against sepal width.

By the end of the quiz, you will have set up a neural network that predicts the type of Iris based on the four data points! Ready to do it?

  • Question 1

    Select the code snippet that creates an input layer that accepts the Iris dataset:

    • model.add(Dense(12, input_dim=12, activation='relu'))
      
    • model.add(Dense(1, input_dim=6, activation='relu'))
      
    • model.add(Dense(8, input_dim=4, activation='relu'))
      
    • model.add(Dense(8, input_dim=8, activation='relu'))
      
  • Question 2

    Select the code snippet that can predict one of the Iris types. Remember that code snippet needs to create an output layer!

    • model.add(Dense(4, activation=...))
      
    • model.add(Dense(6, activation=...))
      
    • model.add(Dense(15, activation=...))
      
    • model.add(Dense(3, activation=...))
      
  • Question 3

    Select the code that sets up the correct activation function for the model:

    • activation=sigmoid
    • activation=categorical_cross_entropy
    • activation=softmax
    • activation=relu
Ever considered an OpenClassrooms diploma?
  • Up to 100% of your training program funded
  • Flexible start date
  • Career-focused projects
  • Individual mentoring
Find the training program and funding option that suits you best