advanced learning algorithms coursera week 1 answers

Practice quiz: Neural networks intuition

1. Which of these are terms used to refer to components of an artificial neural network? (hint: three of these are correct)

  • activation function
  • neurons
  • layers
  • axon

2. True/False? Neural networks take inspiration from, but do not very accurately mimic, how neurons in a biological brain learn.

  • True
  • False

Practice quiz: Neural network model

3. For a neural network, what is the expression for calculating the activation of the third neuron in layer 2? Note, this is different from the question that you saw in the lecture video.

4. For the handwriting recognition task discussed in lecture, what is the output 1 [ 3 ] a 1 [3] ​ ?

  • A vector of several numbers, each of which is either exactly 0 or 1
  • The estimated probability that the input image is of a number 1, a number that ranges from 0 to 1.
  • A vector of several numbers that take values between 0 and 1
  • A number that is either exactly 0 or 1, comprising the network’s prediction

Practice quiz: TensorFlow implementation

5. For the the following code:

model = Sequential([

Dense(units=25, activation="sigmoid"),

Dense(units=15, activation="sigmoid"),

Dense(units=10, activation="sigmoid"),

Dense(units=1, activation="sigmoid")])


This code will define a neural network with how many layers?

  • 3
  • 25
  • 5
  • 4 (Correct Answer)

6. How do you define the second layer of a neural network that has 4 neurons and a sigmoid activation?

  • Dense(units=[4], activation=[‘sigmoid’])
  • Dense(layer=2, units=4, activation = ‘sigmoid’)
  • Dense(units=4)
  • Dense(units=4, activation=‘sigmoid’)

7. If the input features are temperature (in Celsius) and duration (in minutes), how do you write the code for the first feature vector x shown above?

  • x = np.array([[200.0, 17.0]])
  • x = np.array([[200.0],[17.0]])
  • x = np.array([[‘200.0’, ’17.0’]])
  • x = np.array([[200.0 + 17.0]])

Practice quiz: Neural network implementation in Python

8. According to the lecture, how do you calculate the activation of the third neuron in the first layer using NumPy?

  • z1_3 = np.dot(w1_3, x) + b1_3

    a1_3 = sigmoid(z1_3)

  • layer_1 = Dense(units=3, activation=’sigmoid’)

    a_1 = layer_1(x)

  • z1_3 =w1_3 * x + b

    a1_3 = sigmoid(z1_3)

9. According to the lecture, when coding up the numpy array W, where would you place the w parameters for each neuron?

  • In the columns of W.
  • In the rows of W.

10. For the code above in the "dense" function that defines a single layer of neurons, how many times does the code go through the "for loop"? Note that W has 2 rows and 3 columns.

  • 3 times
  • 5 times
  • 6 times
  • 2 times

Leave a Reply