1. Home
  2. Explore
  3. Computer Science
  4. Neural Networks for Image Recognition

Study methods

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

Neural Networks for Image Recognition

  • 15Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Neural Network Basics

What are the two components that determine the output of a neuron in a neural network?

15 questions

  1. 1

    What are the two components that determine the output of a neuron in a neural network?

    Model answer

    The weighted sum of inputs plus a bias term.

    Explanation

    The output is computed as the sum of each input multiplied by its weight, then adding a bias. This is then typically passed through an activation function.

  2. 2

    What is the purpose of a decision boundary in classification?

    Model answer

    To separate data points of different classes in the input space.

    Explanation

    A decision boundary is a line (or hyperplane in higher dimensions) that divides the input space into regions, each assigned to a specific class.

  3. 3

    Why is a single-layer network without hidden layers insufficient for non-linearly separable data?

    Model answer

    Because it can only produce linear decision boundaries.

    Explanation

    A single-layer perceptron can only separate classes with a straight line (linear decision boundary). For non-linear separability, hidden layers with non-linear activation functions are needed.

  4. 4

    What is the role of a hidden layer in a neural network?

    Model answer

    To allow the network to learn non-linear decision boundaries.

    Explanation

    Hidden layers, combined with non-linear activation functions, enable the network to model complex, non-linear relationships in the data.

  5. 5

    Define the sigmoid activation function and its derivative.

    Model answer

    Sigmoid: σ(x)=11+e−x\sigma(x) = \frac{1}{1+e^{-x}}σ(x)=1+e−x1​. Its derivative: σ′(x)=σ(x)(1−σ(x))\sigma'(x) = \sigma(x)(1-\sigma(x))σ′(x)=σ(x)(1−σ(x)).

    Explanation

    The sigmoid function squashes input values to a range between 0 and 1. Its derivative is computed as the output times one minus the output, which is used during backpropagation.

  6. 6

    How is the cost for a single output node computed?

    Model answer

    The cost is (a−y)2(a - y)^2(a−y)2, where aaa is the actual output and yyy is the expected output.

    Explanation

    The node cost measures the squared error between the network's prediction and the target, emphasizing larger errors.

  7. 7

    Explain gradient descent for a single-variable function.

    Model answer

    Gradient descent iteratively updates the input by subtracting the slope (derivative) times a learning rate to minimize the function.

    Explanation

    Starting from a random point, the algorithm moves in the direction opposite to the gradient (downhill) to find a minimum. The learning rate controls step size.

  8. 8

    What is the advantage of using mini-batch gradient descent over full-batch gradient descent?

    Model answer

    Mini-batch processes only a small subset of data per iteration, making each update faster and introducing noise that can help escape saddle points and local minima.

    Explanation

    Full-batch uses all data per step, which is slow for large datasets. Mini-batch speeds up training and the noise can improve generalization.

  9. 9

    How does the chain rule enable efficient calculation of gradients in a neural network?

    Model answer

    The chain rule decomposes the derivative of the cost with respect to a weight into a product of simpler derivatives along the path from the weight to the cost.

    Explanation

    In backpropagation, the gradient of the cost w.r.t. each weight is computed by multiplying local gradients (e.g., derivative of activation, derivative of cost) using the chain rule, allowing reuse of intermediate values.

  10. 10

    What is the key idea of the backpropagation algorithm?

    Model answer

    Backpropagation computes gradients efficiently by propagating errors backward through the network, starting from the output layer to the input layer.

    Explanation

    It calculates the gradient of the cost with respect to each weight and bias in a single forward and backward pass, using the chain rule to reuse calculations.

  11. 11

    In backpropagation, how is the gradient of the cost with respect to a weight in the output layer computed?

    Model answer

    It is the product of the node value (∂C/∂z\partial C/\partial z∂C/∂z) and the activation from the previous layer (apreva_{prev}aprev​).

    Explanation

    For a weight connecting node iii in layer L−1L-1L−1 to node jjj in output layer LLL, ∂C∂wij=δj⋅ai\frac{\partial C}{\partial w_{ij}} = \delta_j \cdot a_i∂wij​∂C​=δj​⋅ai​, where δj=∂C∂zj=∂C∂ajσ′(zj)\delta_j = \frac{\partial C}{\partial z_j} = \frac{\partial C}{\partial a_j}\sigma'(z_j)δj​=∂zj​∂C​=∂aj​∂C​σ′(zj​).

  12. 12

    Why is the handwritten digit dataset MNIST considered a good benchmark?

    Model answer

    It contains 70,000 labeled 28x28 grayscale images of digits, making it a standard test for image classification algorithms.

    Explanation

    MNIST is widely used because it is moderate in size, simple enough for basic models, and has well-defined train/test splits.

  13. 13

    What problem arises when a neural network achieves high accuracy on training data but lower accuracy on test data?

    Model answer

    Overfitting: the network has memorized training data rather than learning general patterns.

    Explanation

    Overfitting occurs when the model learns noise and specific details of the training set, failing to generalize to unseen data. It can be reduced by regularization techniques like data augmentation or noise injection.

  14. 14

    How can data augmentation improve neural network generalization?

    Model answer

    By creating modified versions of training images (e.g., rotated, scaled, translated, noisy), the network learns invariance to these transformations and avoids memorizing exact positions or sizes.

    Explanation

    Data augmentation artificially increases the training set size and diversity, forcing the network to learn more robust features that generalize better to new data.

  15. 15

    Why is a simple neural network with fully connected layers poor at recognizing objects in complex color images (e.g., CIFAR-10)?

    Model answer

    Because such images contain high variability, background clutter, and require spatial invariance that fully connected networks cannot efficiently capture.

    Explanation

    Fully connected networks treat each pixel independently and have no built-in translation invariance, leading to many parameters and difficulty handling natural images. Convolutional neural networks (CNNs) are better suited due to shared weights and local connectivity.

1 of 15
Question 1 of 15

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent