Intro to Neural Networks
- 39Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What are the three main types of layers in a neural network?
Input layer, hidden layers, and output layer.
Or swipe the card
39 cards
What are the three main types of layers in a neural network?
Input layer, hidden layers, and output layer.
What does it mean for a neural network to be 'fully connected'?
Each neuron in a layer is connected to every neuron in the next layer.
What is a weight in a neural network?
A weight is a multiplier on the connection between two neurons.
What is a bias in a neural network?
A value added to the weighted sum of inputs at a neuron (except input neurons).
What are hidden layers in a neural network?
Layers between the input and output layers.
How is the output of a single neuron computed?
The neuron sums each input multiplied by its corresponding weight, adds a bias, then applies an activation function.
How is a neural network analogous to a mathematical function?
Both take an input and produce an output; a neural network can be viewed as a function approximator.
Can a neural network have multiple outputs? How is it interpreted?
Yes, a neural network can have multiple output neurons, representing multiple functions sharing the same inputs.
What type of function can a simple single-layer neural network (no hidden layers, no activation) represent?
Any linear function of the form y=wx+b (with one input) or y=w1x1+w2x2+⋯+b (with multiple inputs).
Why can't a neural network with only linear activation represent non-linear functions?
Because composing (stacking) linear functions always yields a linear function.
Give an example of a simple linear function a neural network can learn with one input and one output.
f(x)=2x+3 can be learned by setting weight=2 and bias=3.
What is the universal approximation property of neural networks?
A neural network with sufficient neurons and non-linear activation functions can approximate any continuous function to arbitrary accuracy.
What is the purpose of an activation function in a neural network?
To introduce non-linearity, enabling the network to learn and approximate non-linear functions.
Describe the ReLU (Rectified Linear Unit) activation function.
ReLU(x)=max(0,x): it outputs 0 for negative inputs and the input itself for positive inputs.
Describe the step activation function.
Step(x)=1 if x>0, else 0. It outputs a binary value.
Describe the sigmoid activation function.
Sigmoid(x)=1+e−x1, which squashes the input to a value between 0 and 1.
How does using activation functions allow neural networks to approximate non-linear functions?
By combining neurons with activation functions, each neuron can activate in specific regions, allowing the network to create piecewise linear or curved approximations.
What is the derivative of the ReLU activation function?
ReLU′(x)=0 for x≤0; ReLU′(x)=1 for x>0.
What is the derivative of the sigmoid activation function?
Sigmoid′(x)=Sigmoid(x)⋅(1−Sigmoid(x)).
What is the cost function in supervised learning for neural networks?
The average (or sum) of squared errors between network outputs and true labels over all training examples.
What is the goal of training a neural network?
To minimize the cost function by adjusting the network's weights and biases.
Explain the finite difference method for estimating the gradient of the cost with respect to a weight.
Increase the weight by a small ϵ, compute the new cost, then approximate the derivative as (costnew−costold)/ϵ.
What is the learning rate (α) in gradient descent?
A hyperparameter that controls the step size when updating weights and biases.
Why is the finite difference method impractical for large neural networks?
It requires a forward pass for every weight and bias to compute the cost change, which is computationally expensive.
What is the gradient of the cost with respect to a parameter?
The derivative of the cost function with respect to that parameter, indicating how much the cost changes with a small change in the parameter.
What is backpropagation?
An algorithm that efficiently computes the gradient of the cost function with respect to all weights and biases in a neural network using the chain rule.
What is the chain rule in the context of backpropagation?
It is used to compute the derivative of the cost with respect to a weight by multiplying the derivatives along the path from the weight to the cost.
In the network with one input, one hidden neuron, and one output, what is the derivative of cost with respect to the first weight (w1)?
dw1dC=a0⋅σ′(z1)⋅w2⋅σ′(z2)⋅2(a2−y)
How does backpropagation handle layers with multiple neurons?
When a neuron's output contributes to multiple later neurons, the derivative of the cost with respect to that neuron's output is the sum of the derivatives from each path.
What is the forward pass in backpropagation?
The computation of all neuron values (z and a) from input to output, layer by layer.
What is the backward pass in backpropagation?
The computation of gradients of the cost with respect to weights and biases, starting from the output layer and moving backward to the input layer.
How are weights updated using backpropagation?
After computing the average gradient over a batch, each weight is updated by subtracting (learning rate) ⋅ (gradient) from it.
Why is backpropagation more efficient than finite differences?
Backpropagation computes gradients for all parameters in just one forward and one backward pass, regardless of the number of parameters.
What is the role of the derivative of the activation function in backpropagation?
It appears in the chain rule when computing gradients, e.g., for sigmoid, derivative is a(1−a) where a is the output.
What is mini-batch gradient descent?
A training method where the dataset is split into smaller batches, and gradients are computed on each batch before updating weights.
Describe the training process for a neural network approximating a function using 50 random points.
Initialize weights and biases randomly, then repeatedly: forward pass to compute output and cost, backward pass (backpropagation) to compute gradients, update parameters using gradient descent with a learning rate, and repeat until cost decreases sufficiently.
How does a neural network classify colored dots (four colors) with x,y coordinates as input?
The network has two input neurons (x,y) and four output neurons (one per color). After training on labeled data, it learns to output the correct color probability for each input region.
What types of problems can neural networks solve according to the video?
Any problem that can be expressed as a function or set of functions, such as language modeling (next word prediction) and image recognition (detecting objects).
Why might the output layer of a neural network use a sigmoid activation?
To constrain output values between 0 and 1, making them interpretable as probabilities for binary classification.

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