1. Home
  2. Explore
  3. Computer Science
  4. Neural Network Gradients

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Neural Network Gradients

  • 45Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Gradient Methods

How does a numerical gradient approximate the derivative of a function?

45 questions

  1. 1

    How does a numerical gradient approximate the derivative of a function?

    1. A

      It compares the model's loss before and after changing every parameter at once.

    2. B

      It measures the output change for a small input change and divides by that change.

    3. C

      It calculates the exact symbolic derivative and simplifies it algebraically.

    4. D

      It fits a straight line through every input-output pair in the training set.

    Correct answer
    B

    It measures the output change for a small input change and divides by that change.

    Explanation

    A numerical gradient uses a finite, small increment and computes the corresponding output change divided by the increment, approximating the limit in the derivative definition.

  2. 2

    What is a key advantage of numerical gradients?

    1. A

      They evaluate all parameter gradients in one network run.

    2. B

      They require little algebra and can be applied to many kinds of functions.

    3. C

      They always produce exact derivatives, regardless of increment size.

    4. D

      They require the function to be linear throughout its domain.

    Correct answer
    B

    They require little algebra and can be applied to many kinds of functions.

    Explanation

    Numerical gradients are straightforward to understand and implement, and they impose few restrictions beyond requiring the function to behave coherently near the points being compared.

  3. 3

    Which condition is needed for a numerical gradient using a small increment to be meaningful?

    1. A

      The function must have a known symbolic derivative at every point.

    2. B

      The function must produce the same output at the original and incremented inputs.

    3. C

      The function must use only linear operations and contain no activation functions.

    4. D

      The function must be defined at both the original input and the incremented input, with behavior between them reasonably represented.

    Correct answer
    D

    The function must be defined at both the original input and the incremented input, with behavior between them reasonably represented.

    Explanation

    The method requires the function to be defined at both points and assumes that the line between them is reasonably close to the function's behavior in that interval.

  4. 4

    Why is numerical differentiation generally impractical for training a large neural network?

    1. A

      It can calculate gradients only for the final layer of a network.

    2. B

      It requires perturbing each weight individually and evaluating the network for each perturbation.

    3. C

      It cannot be used when a model contains hidden layers.

    4. D

      It requires the network to have a convex loss function.

    Correct answer
    B

    It requires perturbing each weight individually and evaluating the network for each perturbation.

    Explanation

    For each weight, the network must be evaluated to see the effect of perturbing that weight. Repeating this for a large number of weights is very slow.

  5. 5

    When is deriving gradients analytically generally preferable to numerical differentiation?

    1. A

      When a direct expression can be derived, because it can be evaluated efficiently without repeated perturbed runs.

    2. B

      When an exact derivative is unnecessary, because analytic gradients are only approximations.

    3. C

      When a model has many parameters, because symbolic differentiation always requires less algebra.

    4. D

      When a function is undefined at nearby inputs, because symbolic expressions do not need function values.

    Correct answer
    A

    When a direct expression can be derived, because it can be evaluated efficiently without repeated perturbed runs.

    Explanation

    Where deriving an analytic gradient is feasible, it gives a direct expression that can be evaluated efficiently. Numerical differentiation would require repeated network evaluations.

  6. 6

    What makes deriving gradients by hand difficult for large compound functions?

    1. A

      The chain rule does not apply to functions with multiple layers.

    2. B

      The gradients must be estimated from a separate validation set.

    3. C

      Analytic derivatives cannot be used to update model parameters.

    4. D

      The algebra can become intractable and is vulnerable to small errors that affect the result.

    Correct answer
    D

    The algebra can become intractable and is vulnerable to small errors that affect the result.

    Explanation

    For complicated compound functions, working through all the algebra by hand can be extremely difficult and error-prone.

  7. 7

    What basic operation does the chain rule prescribe for derivatives of composed functions?

    1. A

      Add the derivatives of the component functions, evaluated at the final output.

    2. B

      Take the derivative of only the component closest to the original input.

    3. C

      Divide the derivative of the outer function by the derivative of the inner function.

    4. D

      Multiply the derivatives of the component functions, evaluated at the appropriate inputs.

    Correct answer
    D

    Multiply the derivatives of the component functions, evaluated at the appropriate inputs.

    Explanation

    For composed functions, the chain rule multiplies the derivatives of the component functions, with each derivative evaluated at the input it receives.

  8. 8

    In the chain rule for f(g(x))f(g(x))f(g(x)), where is the derivative of fff evaluated?

    1. A

      At the derivative of ggg evaluated at xxx.

    2. B

      At f(g(x))f(g(x))f(g(x)), the final output of the composition.

    3. C

      At xxx, the original input to the entire composition.

    4. D

      At g(x)g(x)g(x), the output of the inner function.

    Correct answer
    D

    At g(x)g(x)g(x), the output of the inner function.

    Explanation

    The derivative is f′(g(x))g′(x)f'(g(x))g'(x)f′(g(x))g′(x): the outer function's derivative is evaluated at the inner function's output, while the inner derivative is evaluated at xxx.

  9. 9

    How is the derivative of f(g(h(x)))f(g(h(x)))f(g(h(x))) formed?

    1. A

      Multiply all three derivatives after evaluating each one at the final output.

    2. B

      Multiply f′f'f′ evaluated at g(h(x))g(h(x))g(h(x)), g′g'g′ evaluated at h(x)h(x)h(x), and h′h'h′ evaluated at xxx.

    3. C

      Add f′f'f′ evaluated at g(h(x))g(h(x))g(h(x)), g′g'g′ evaluated at h(x)h(x)h(x), and h′h'h′ evaluated at xxx.

    4. D

      Multiply f′f'f′ at xxx, g′g'g′ at g(x)g(x)g(x), and h′h'h′ at h(x)h(x)h(x).

    Correct answer
    B

    Multiply f′f'f′ evaluated at g(h(x))g(h(x))g(h(x)), g′g'g′ evaluated at h(x)h(x)h(x), and h′h'h′ evaluated at xxx.

    Explanation

    The chain rule multiplies the derivative of each operation at its own input: f′(g(h(x)))g′(h(x))h′(x)f'(g(h(x)))g'(h(x))h'(x)f′(g(h(x)))g′(h(x))h′(x).

  10. 10

    In a directed computational graph, what do nodes and edges represent?

    1. A

      Nodes represent training examples, and edges represent prediction errors.

    2. B

      Nodes represent outputs, and edges represent the loss functions applied to them.

    3. C

      Nodes represent operations, and edges represent the flow of data between them.

    4. D

      Nodes represent parameter values, and edges represent their numerical gradients only.

    Correct answer
    C

    Nodes represent operations, and edges represent the flow of data between them.

    Explanation

    A computational graph represents operations as nodes and the movement of data between operations as edges.

  11. 11

    For the composition g(f(x))g(f(x))g(f(x)), what is the local derivative at the node applying ggg?

    1. A

      f′(x)g′(x)f'(x)g'(x)f′(x)g′(x), since a node's local derivative includes the entire graph.

    2. B

      g′(f(x))g'(f(x))g′(f(x)), since the input to that node is f(x)f(x)f(x).

    3. C

      f′(g(x))f'(g(x))f′(g(x)), since the first operation determines the second node's gradient.

    4. D

      g′(x)g'(x)g′(x), since every node's derivative is evaluated at the original input.

    Correct answer
    B

    g′(f(x))g'(f(x))g′(f(x)), since the input to that node is f(x)f(x)f(x).

    Explanation

    The ggg node receives f(x)f(x)f(x) as its input, so its local derivative is g′(f(x))g'(f(x))g′(f(x)).

  12. 12

    Why is it useful to describe gradients as flowing backward through a computational graph?

    1. A

      It means that the forward data values must be calculated in reverse order.

    2. B

      It ensures that all local derivatives are evaluated at the graph's original input.

    3. C

      It changes the chain rule so that derivatives are divided rather than multiplied.

    4. D

      It gives a convenient way to compute the total derivative by combining local derivatives from the output toward earlier operations.

    Correct answer
    D

    It gives a convenient way to compute the total derivative by combining local derivatives from the output toward earlier operations.

    Explanation

    Although multiplication of scalar derivatives is commutative, computing gradients backward from the output is a useful way to organize the chain rule.

  13. 13

    A graph applies sine and then exponential to an input xxx. What is the derivative of the final output?

    1. A

      cos⁡(exp⁡(x))sin⁡(x)\cos(\exp(x))\sin(x)cos(exp(x))sin(x)

    2. B

      sin⁡(x)exp⁡(cos⁡(x))\sin(x)\exp(\cos(x))sin(x)exp(cos(x))

    3. C

      cos⁡(x)exp⁡(sin⁡(x))\cos(x)\exp(\sin(x))cos(x)exp(sin(x))

    4. D

      exp⁡(x)cos⁡(sin⁡(x))\exp(x)\cos(\sin(x))exp(x)cos(sin(x))

    Correct answer
    C

    cos⁡(x)exp⁡(sin⁡(x))\cos(x)\exp(\sin(x))cos(x)exp(sin(x))

    Explanation

    The output is exp⁡(sin⁡(x))\exp(\sin(x))exp(sin(x)). The exponential derivative at its input is exp⁡(sin⁡(x))\exp(\sin(x))exp(sin(x)), and the sine derivative at xxx is cos⁡(x)\cos(x)cos(x); the chain rule multiplies them.

  14. 14

    What function results from successively negating xxx, exponentiating, adding one, and taking a reciprocal?

    1. A

      1+e−x1+e^{-x}1+e−x, the unreciprocated exponential expression

    2. B

      11+ex\frac{1}{1+e^x}1+ex1​, the reciprocal of the sigmoid function

    3. C

      11+e−x\frac{1}{1+e^{-x}}1+e−x1​, the sigmoid function

    4. D

      1e−x+1\frac{1}{e^{-x}}+1e−x1​+1, the exponential with a reciprocal

    Correct answer
    C

    11+e−x\frac{1}{1+e^{-x}}1+e−x1​, the sigmoid function

    Explanation

    The four operations produce −x-x−x, then e−xe^{-x}e−x, then 1+e−x1+e^{-x}1+e−x, and finally 11+e−x\frac{1}{1+e^{-x}}1+e−x1​, which is the sigmoid function.

  15. 15

    Which local derivative belongs to the reciprocal operation r(u)=1/ur(u)=1/ur(u)=1/u?

    1. A

      111

    2. B

      −1/u2-1/u^2−1/u2

    3. C

      1/u21/u^21/u2

    4. D

      −1/u-1/u−1/u

    Correct answer
    B

    −1/u2-1/u^2−1/u2

    Explanation

    The derivative of the reciprocal function is r′(u)=−1/u2r'(u)=-1/u^2r′(u)=−1/u2.

  16. 16

    For y=σ(xw)y=\sigma(xw)y=σ(xw), where σ\sigmaσ is the sigmoid function, what is ∂y∂x\frac{\partial y}{\partial x}∂x∂y​?

    1. A

      xw σ′(xw)xw\,\sigma'(xw)xwσ′(xw)

    2. B

      w σ′(xw)w\,\sigma'(xw)wσ′(xw)

    3. C

      σ′(xw)\sigma'(xw)σ′(xw)

    4. D

      x σ′(xw)x\,\sigma'(xw)xσ′(xw)

    Correct answer
    B

    w σ′(xw)w\,\sigma'(xw)wσ′(xw)

    Explanation

    The derivative of xwxwxw with respect to xxx is www. Multiplying by the sigmoid derivative at xwxwxw gives ∂y∂x=wσ′(xw)\frac{\partial y}{\partial x}=w\sigma'(xw)∂x∂y​=wσ′(xw).

  17. 17

    For y=σ(xw)y=\sigma(xw)y=σ(xw), where σ\sigmaσ is the sigmoid function, what is ∂y∂w\frac{\partial y}{\partial w}∂w∂y​?

    1. A

      σ′(xw)\sigma'(xw)σ′(xw)

    2. B

      w σ′(xw)w\,\sigma'(xw)wσ′(xw)

    3. C

      x σ′(xw)x\,\sigma'(xw)xσ′(xw)

    4. D

      xw σ′(xw)xw\,\sigma'(xw)xwσ′(xw)

    Correct answer
    C

    x σ′(xw)x\,\sigma'(xw)xσ′(xw)

    Explanation

    The derivative of xwxwxw with respect to www is xxx. Multiplying by the sigmoid derivative at xwxwxw gives ∂y∂w=xσ′(xw)\frac{\partial y}{\partial w}=x\sigma'(xw)∂w∂y​=xσ′(xw).

  18. 18

    In the sequence −x-x−x, e−xe^{-x}e−x, 1+e−x1+e^{-x}1+e−x, and 1/(1+e−x)1/(1+e^{-x})1/(1+e−x), what is the local derivative of the exponential operation?

    1. A

      The reciprocal of its input, −1/x-1/x−1/x.

    2. B

      One, because the exponential leaves the slope unchanged.

    3. C

      The negative of its output, −e−x-e^{-x}−e−x.

    4. D

      Its output, e−xe^{-x}e−x.

    Correct answer
    D

    Its output, e−xe^{-x}e−x.

    Explanation

    The derivative of the exponential function is the exponential itself, so its local derivative is its output, e−xe^{-x}e−x.

  19. 19

    Why can a computational graph propagate numerical gradients without carrying a full symbolic derivative expression?

    1. A

      Numerical gradients eliminate the need to calculate local derivatives.

    2. B

      For a particular input, each operation can calculate a numeric local derivative and combine it with the downstream gradient.

    3. C

      Each node can infer the entire network's symbolic formula from its inputs.

    4. D

      The network's final gradient is always equal to the output value.

    Correct answer
    B

    For a particular input, each operation can calculate a numeric local derivative and combine it with the downstream gradient.

    Explanation

    For a particular case, nodes need numeric local derivatives, not a full symbolic expression. Each local derivative is combined with the gradient arriving from downstream.

  20. 20

    For the composition exp⁡(sin⁡(x))\exp(\sin(x))exp(sin(x)) at x=2x=2x=2, which approximate derivative follows from the provided numerical values?

    1. A

      About 1.041.041.04

    2. B

      About −1.04-1.04−1.04

    3. C

      About 2.482.482.48

    4. D

      About 0.910.910.91

    Correct answer
    B

    About −1.04-1.04−1.04

    Explanation

    At x=2x=2x=2, cos⁡(2)\cos(2)cos(2) is about −0.42-0.42−0.42 and exp⁡(sin⁡(2))\exp(\sin(2))exp(sin(2)) is about 2.482.482.48. Their product is approximately −1.04-1.04−1.04.

  21. 21

    For the sigmoid construction at input x=1.5x=1.5x=1.5, what approximate output is obtained?

    1. A

      About 0.150.150.15

    2. B

      About 0.220.220.22

    3. C

      About 1.221.221.22

    4. D

      About 0.820.820.82

    Correct answer
    D

    About 0.820.820.82

    Explanation

    The intermediate values are −1.5-1.5−1.5, approximately 0.220.220.22 after exponentiation, and approximately 1.221.221.22 after adding one. Taking the reciprocal gives approximately 0.820.820.82.

  22. 22

    For the sigmoid construction at input x=1.5x=1.5x=1.5, what approximate overall derivative is obtained by multiplying the local gradients?

    1. A

      About 0.220.220.22

    2. B

      About 0.820.820.82

    3. C

      About 0.150.150.15

    4. D

      About −0.67-0.67−0.67

    Correct answer
    C

    About 0.150.150.15

    Explanation

    The local gradients are approximately −1-1−1, 0.220.220.22, 111, and −0.67-0.67−0.67. Their product is approximately 0.150.150.15.

  23. 23

    For y=σ(xw)y=\sigma(xw)y=σ(xw) at x=−1.2x=-1.2x=−1.2 and w=0.3w=0.3w=0.3, which approximate pair of gradients is given for (∂y/∂x,∂y/∂w)(\partial y/\partial x,\partial y/\partial w)(∂y/∂x,∂y/∂w)?

    1. A

      (0.07,−0.29)(0.07,-0.29)(0.07,−0.29)

    2. B

      (−0.29,0.07)(-0.29,0.07)(−0.29,0.07)

    3. C

      (0.24,0.41)(0.24,0.41)(0.24,0.41)

    4. D

      (−0.36,0.24)(-0.36,0.24)(−0.36,0.24)

    Correct answer
    A

    (0.07,−0.29)(0.07,-0.29)(0.07,−0.29)

    Explanation

    The product input is xw=−0.36xw=-0.36xw=−0.36, and the sigmoid derivative there is about 0.240.240.24. Multiplying by w=0.3w=0.3w=0.3 gives about 0.070.070.07 for the input gradient; multiplying by x=−1.2x=-1.2x=−1.2 gives about −0.29-0.29−0.29 for the weight gradient.

  24. 24

    When computing gradients through a chain of operations, why can pairwise multiplication be performed starting from the end?

    1. A

      Only the final two local derivatives affect the gradient at the input.

    2. B

      The final operation always has a derivative of one, so earlier derivatives can be ignored.

    3. C

      Derivative multiplication is associative, so it can be grouped into pairwise products while preserving the total product.

    4. D

      Backward grouping changes the chain rule into an addition rule.

    Correct answer
    C

    Derivative multiplication is associative, so it can be grouped into pairwise products while preserving the total product.

    Explanation

    Because multiplication is associative, the chain of local derivatives can be bracketed as pairwise multiplications, starting from the output and passing intermediate gradients backward.

  25. 25

    What information does a node need to calculate its contribution to a backward gradient?

    1. A

      The complete structure and symbolic expression of every later node.

    2. B

      The gradients of all unrelated branches in the graph.

    3. C

      The training labels for every example in the dataset.

    4. D

      Its local information and the downstream gradient it receives.

    Correct answer
    D

    Its local information and the downstream gradient it receives.

    Explanation

    A node uses its inputs, outputs, local derivative, and the gradient handed back from downstream. It need not know the full network beyond itself.

  26. 26

    How can a graph designer choose where one operation or node ends and another begins?

    1. A

      They must represent every arithmetic operation as a separate node.

    2. B

      They must use nodes only for operations that have linear derivatives.

    3. C

      They can choose boundaries that make sense, either splitting into simple operations or grouping a compound function with a known derivative.

    4. D

      They must group the entire network into one node to preserve the chain rule.

    Correct answer
    C

    They can choose boundaries that make sense, either splitting into simple operations or grouping a compound function with a known derivative.

    Explanation

    Node boundaries are flexible. A compound function with a known derivative can be treated as one atomic node, or broken into simpler operations.

  27. 27

    How are gradients represented for vector or matrix inputs?

    1. A

      As vectors or matrices with the same shape as the corresponding inputs, with partial derivatives in matching positions.

    2. B

      As vectors or matrices with the dimensions reversed from the corresponding inputs.

    3. C

      As a single scalar regardless of the input's dimensions.

    4. D

      As lists containing only derivatives of the final output.

    Correct answer
    A

    As vectors or matrices with the same shape as the corresponding inputs, with partial derivatives in matching positions.

    Explanation

    For vector and matrix inputs, gradients are arrays of partial derivatives with the same size and shape as the data or weights they correspond to.

  28. 28

    For the dot product z=x⋅wz=x\cdot wz=x⋅w of two vectors, what are the gradients of the scalar output with respect to xxx and www?

    1. A

      ∇xz=x⋅w\nabla_x z=x\cdot w∇x​z=x⋅w and ∇wz=x⋅w\nabla_w z=x\cdot w∇w​z=x⋅w

    2. B

      ∇xz=w\nabla_x z=w∇x​z=w and ∇wz=x\nabla_w z=x∇w​z=x

    3. C

      ∇xz=0\nabla_x z=0∇x​z=0 and ∇wz=0\nabla_w z=0∇w​z=0

    4. D

      ∇xz=x\nabla_x z=x∇x​z=x and ∇wz=w\nabla_w z=w∇w​z=w

    Correct answer
    B

    ∇xz=w\nabla_x z=w∇x​z=w and ∇wz=x\nabla_w z=x∇w​z=x

    Explanation

    For a dot product, the gradient with respect to one vector is the other vector: ∇xz=w\nabla_x z=w∇x​z=w and ∇wz=x\nabla_w z=x∇w​z=x.

  29. 29

    In a fully connected layer, why are gradients with respect to both inputs and weights useful?

    1. A

      The input gradient passes information upstream, while the weight gradient supports updating the layer's weights.

    2. B

      The input gradient updates the weights, while the weight gradient calculates the loss.

    3. C

      Both gradients are used only to determine whether the network is convex.

    4. D

      The input gradient is needed only for the forward pass, while the weight gradient is needed only to compute predictions.

    Correct answer
    A

    The input gradient passes information upstream, while the weight gradient supports updating the layer's weights.

    Explanation

    The gradient with respect to the input is propagated to upstream nodes, and the gradient with respect to the weights is used to update the layer's parameters.

  30. 30

    For an elementwise activation applied independently to a vector's entries, what form does its gradient take?

    1. A

      A single scalar derivative evaluated at the sum of all input entries.

    2. B

      A vector of the scalar function's derivatives evaluated at the corresponding input entries.

    3. C

      A full matrix in which every entry must be nonzero.

    4. D

      A vector of the activation outputs, regardless of the activation's derivative.

    Correct answer
    B

    A vector of the scalar function's derivatives evaluated at the corresponding input entries.

    Explanation

    Each output element depends only on its corresponding input element, so the gradient consists of the individual scalar derivatives at those elements.

  31. 31

    Why can the Jacobian of softmax be inconvenient to pass through a network on its own?

    1. A

      The Jacobian contains only weight derivatives and no input derivatives.

    2. B

      Softmax produces only a scalar, so its gradient cannot be represented.

    3. C

      Softmax has no derivative when its inputs are vectors.

    4. D

      Each softmax output can depend on every input element, so its derivative involves a full Jacobian.

    Correct answer
    D

    Each softmax output can depend on every input element, so its derivative involves a full Jacobian.

    Explanation

    Softmax is a vector-valued function of vector inputs, and each output element depends on all input elements. Its gradient therefore involves the full Jacobian.

  32. 32

    Why might softmax and cross-entropy be bundled into one layer?

    1. A

      The combination makes the softmax output independent of its inputs.

    2. B

      Combining them simplifies the gradient and avoids passing around unnecessary Jacobian elements.

    3. C

      The combination removes the need to calculate a loss.

    4. D

      Cross-entropy changes the softmax into an elementwise linear function.

    Correct answer
    B

    Combining them simplifies the gradient and avoids passing around unnecessary Jacobian elements.

    Explanation

    When softmax is combined with cross-entropy loss, many extraneous Jacobian terms disappear, leaving a simpler gradient. Bundling them avoids passing around the full Jacobian.

  33. 33

    For a layer with multiple outputs and a matrix of weights, what shape should the weight gradient have?

    1. A

      The same shape as the layer's scalar loss, regardless of the number of weights.

    2. B

      A matrix with the same shape as the output vector.

    3. C

      The same shape as the weight matrix, with a derivative for each weight.

    4. D

      A vector with one entry for each input example only.

    Correct answer
    C

    The same shape as the weight matrix, with a derivative for each weight.

    Explanation

    A weight gradient must contain derivatives with respect to every element of the weight matrix, so it has the same shape as that matrix.

  34. 34

    In mini-batch processing, why might a system pass the mean gradient rather than the sum?

    1. A

      The mean preserves every individual example's gradient separately.

    2. B

      The mean guarantees a convex loss for the network.

    3. C

      The mean eliminates the need for a backward pass.

    4. D

      The mean can be more stable and makes gradients more comparable across different batch sizes.

    Correct answer
    D

    The mean can be more stable and makes gradients more comparable across different batch sizes.

    Explanation

    Taking the mean of gradients across a batch can be more stable and makes gradient magnitudes more comparable when batch sizes differ.

  35. 35

    What role does a network-level data structure or class usually play in backpropagation?

    1. A

      It tracks the overall network structure and manages communication among otherwise local layers.

    2. B

      It replaces every layer's local derivative with one shared derivative.

    3. C

      It updates weights before the network's loss has been calculated.

    4. D

      It calculates numerical gradients by perturbing each weight individually.

    Correct answer
    A

    It tracks the overall network structure and manages communication among otherwise local layers.

    Explanation

    Layers can be self-contained, so a data structure or class keeps track of the larger network structure and coordinates communication and traversal.

  36. 36

    What is the dependency order used during the forward pass?

    1. A

      A node is evaluated only after all of its inputs have been calculated.

    2. B

      Nodes are evaluated in order of their parameter magnitudes.

    3. C

      A node is evaluated only after all of its downstream gradients are known.

    4. D

      Every node is evaluated before any of its inputs are calculated.

    Correct answer
    A

    A node is evaluated only after all of its inputs have been calculated.

    Explanation

    The forward pass follows input dependencies: a node must have all its inputs calculated before it can be evaluated.

  37. 37

    What happens at the end of the forward pass?

    1. A

      The optimizer updates all weights before computing predictions.

    2. B

      The gradients are propagated back to the inputs.

    3. C

      The network tests whether its loss function is convex.

    4. D

      The network reaches its final output and calculates the loss.

    Correct answer
    D

    The network reaches its final output and calculates the loss.

    Explanation

    The forward pass carries data through the network, and its final stage calculates the loss from the resulting output.

  38. 38

    How does the backward pass begin and proceed?

    1. A

      It begins by updating the weights, then calculates the loss gradients.

    2. B

      It starts at the inputs and calculates the forward outputs again in reverse.

    3. C

      It starts from the loss and propagates gradients backward through successive layers toward the inputs.

    4. D

      It starts at the middle layer and sends gradients only to downstream layers.

    Correct answer
    C

    It starts from the loss and propagates gradients backward through successive layers toward the inputs.

    Explanation

    The backward pass begins with the loss, computes gradients for the latest elements, and passes those gradients back through the network to earlier nodes.

  39. 39

    What is the distinction between backpropagation and optimization?

    1. A

      Backpropagation calculates gradients; an optimizer uses them to update parameters.

    2. B

      Backpropagation calculates the forward output; an optimizer defines the network structure.

    3. C

      Backpropagation updates weights; an optimizer calculates local derivatives.

    4. D

      Backpropagation makes the loss convex; an optimizer selects the activation functions.

    Correct answer
    A

    Backpropagation calculates gradients; an optimizer uses them to update parameters.

    Explanation

    Backpropagation is the process of calculating gradients. The learning algorithm or optimizer decides how to use those gradients to update weights.

  40. 40

    What is the usual repeated training cycle after gradients have been calculated?

    1. A

      Calculate the loss once, then continue updating weights without further network passes.

    2. B

      Run backward passes repeatedly without updating weights, then stop when the loss is convex.

    3. C

      Use an optimization policy to update weights, then run another forward and backward pass until a stopping criterion is reached.

    4. D

      Update weights once, then use only numerical gradients for the rest of training.

    Correct answer
    C

    Use an optimization policy to update weights, then run another forward and backward pass until a stopping criterion is reached.

    Explanation

    The optimizer updates weights using their gradients, after which the forward and backward passes are repeated until a stopping criterion is met.

  41. 41

    Which statement best describes the convexity of loss functions for multilayer perceptrons?

    1. A

      All multilayer perceptrons have convex losses because they use gradient descent.

    2. B

      Convexity depends only on whether numerical or analytic gradients are used.

    3. C

      Networks without hidden layers can represent logistic or softmax regression with convex losses, but hidden-layer networks are almost always non-convex.

    4. D

      Networks without hidden layers are non-convex, while adding hidden layers makes their losses convex.

    Correct answer
    C

    Networks without hidden layers can represent logistic or softmax regression with convex losses, but hidden-layer networks are almost always non-convex.

    Explanation

    Simple neural networks without hidden layers can represent logistic or softmax regression, whose losses are convex. Networks with hidden layers are almost always non-convex.

  42. 42

    What optimization risk can arise from a non-convex loss?

    1. A

      The network cannot calculate any gradients.

    2. B

      The forward pass cannot be performed in dependency order.

    3. C

      Every local minimum must be the global minimum.

    4. D

      The optimization procedure may become stuck in a local minimum.

    Correct answer
    D

    The optimization procedure may become stuck in a local minimum.

    Explanation

    Because hidden-layer networks are generally non-convex, optimization may get stuck in local minima rather than reaching a global minimum.

  43. 43

    According to the content, what determines how serious the local-minimum problem is?

    1. A

      The data, network structure, and task being optimized.

    2. B

      Only the notation used to write the chain rule.

    3. C

      Only whether the derivatives are stored as vectors or matrices.

    4. D

      Only the number of arithmetic operations in the forward pass.

    Correct answer
    A

    The data, network structure, and task being optimized.

    Explanation

    The seriousness of local minima depends substantially on the nature of the data, the network structure, and the task.

  44. 44

    What does the term "bad local minimum" refer to in the discussion of some deep-learning problems?

    1. A

      Any local minimum that is not reached by gradient descent.

    2. B

      A local minimum that is a poor approximation of the global minimum.

    3. C

      A local minimum that occurs only in a convex loss function.

    4. D

      A point where the network has no defined forward output.

    Correct answer
    B

    A local minimum that is a poor approximation of the global minimum.

    Explanation

    A bad local minimum is one that is a poor approximation of the true global minimum.

  45. 45

    What observation is reported about local minima in some computer-vision problems?

    1. A

      Local minima matter only when numerical gradients are used.

    2. B

      Every local minimum in computer vision is worse than the global minimum by definition.

    3. C

      Local minima may exist, but they are not necessarily bad because they can approximate the global minimum reasonably well.

    4. D

      Computer-vision problems have no local minima because their losses are always convex.

    Correct answer
    C

    Local minima may exist, but they are not necessarily bad because they can approximate the global minimum reasonably well.

    Explanation

    For some computer-vision problems, evidence suggests that although local minima exist, they are not bad: any local minimum may still be a reasonable approximation of the global minimum.

Question 1 of 45
Question 1 of 45

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent