• 吴恩达Coursera, 机器学习专项课程, Machine Learning:Advanced Learning Algorithms第一周测验


    Practice quiz: Neural networks intuition

    第 1 个问题:Which of these are terms used to refer to components of an artificial neural network?

    【正确】layers
    【解释】Yes, a layer is a grouping of neurons in a neural network
    axon
    【正确】activation function
    【解释】Yes, an activation is the number calculated by a neuron (and an activation is a vector that is output by a layer that contains multiple neurons).
    【正确】neurons
    【解释】Yes, a neuron is a part of a neural network

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

    【正确】True
    False
    Feedback. Artificial neural networks do not actually mimic the complexity of real biological neurons.
    【解释】Artificial neural networks do not actually mimic the complexity of real biological neurons.

    Practice quiz: Neural network model

    第 1 个问题:For a neural network, here is the formula for calculating the activation of the third neuron in layer 2, given the activation vector from layer 1……

    image

    第 2 个问题:For the binary classification for handwriting recognition, discussed in the lecture, which of the following statements are correct?

    【正确】There is a single unit (neuron) in the output layer.
    【解释】This is correct. The neural network outputs a single number between 0 and 1.
    【正确】The output of the model can be interpreted as the probability that the handwritten image is of the number one "1".
    【解释】Correct, since the sigmoid activation's output ranges from 0 to 1, it can be
    【正确】After choosing a threshold, you can convert neural network's output into a category of 0 or 1.
    【解释】If you pick a threshold, such as 0.5, then if the output of the neural network is ≥ that threshold, predict the category "1". Otherwise predict the category "0".
    The neural network cannot be designed to predict if a handwritten image is 8 or 9.

    第 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.

    image

    第 4 个问题:For the handwriting recognition task discussed in lecture, what is the output a^{[3]}_1

    A vector of several numbers, each of which is either exactly 0 or 1
    A vector of several numbers that take values between 0 and 1
    【正确】The estimated probability that the input image is of a number 1, a number that ranges from 0 to 1.
    A number that is either exactly 0 or 1, comprising the network’s prediction
    【解释】Yes! The neural network outputs a single number between 0 and 1.

    Practice quiz: TensorFlow implementation

    第 1 个问题: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?
    【正确】4
    3
    25
    5
    【解释】Yes! Each call to the "Dense" function defines a layer of the neural network.

    第 2 个问题: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], activation=[‘sigmoid’])
    Dense(units=4)
    【解释】Yes! This will have 4 neurons and a sigmoid activation.

    第 3 个问题: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]])
    【解释】Yes! A row contains all the features of a training example. Each column is a feature.

    Neural network implementation in Python

    第 1 个问题:According to the lecture, how do you calculate the activation of the third neuron in the first layer using NumPy?

    image

    第 2 个问题: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.
    【解释】Correct. The w parameters of neuron 1 are in column 1. The w parameters of neuron 2 are in column 2, and so on.

    第 3 个问题: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.

    2 times
    5 times

    For each neuron in the layer, there is one column in the numpy array W. Each row of W represents how many input features are fed into that layer. The for loop calculates the activation value for each neuron.

    6 times

    For each neuron in the layer, there is one column in the numpy array W. Each row of W represents how many input features are fed into that layer. The for loop calculates the activation value for each neuron.

    【正确】3 times

    【解释】Yes! For each neuron in the layer, there is one column in the numpy array W. The for loop calculates the activation value for each neuron. So if there are 5 columns in W, there are 5 neurons in the dense layer, and therefore the for loop goes through 5 iterations (one for each neuron).
    image

  • 相关阅读:
    Centos7 GRE Tunnel
    centos 7 增加永久静态路由
    ceph bluestore与 filestore 数据存放的区别
    swift对象存储安装
    [WebRTC] Audio Codec Encoder 基类注解
    [WebRTC] 源码中的Audio Codec整理
    [Math] Maple函数用法
    [Server] Nginx Https配置 及 Firefox提示“此页面使用较弱加密”
    [Windows] 导出所有设置过的Group Policy
    [Tool] WebDav 安装及使用
  • 原文地址:https://www.cnblogs.com/chuqianyu/p/16438998.html
Copyright © 2020-2023  润新知