Completeness contract
This article follows all fifteen pages of4_CH4-Backgrounds for AI(1).pdf. Ledgers cover numbered and unnumbered displayed equations, meaningful inline mathematics, figure equations and numbers,?,??, blanks, every table cell, captions, footnotes, references, and legible handwriting. Source blanks and notation issues remain visible; completions and corrections receive separate statuses.
Keep three layers distinct.
Separate the 2025 PDF reconstruction, editorial and mathematical verification, and the research update dated August 18, 2026. Later research does not retroactively rewrite the lecture’s claims.
#Ledger status
- PDF mapping: 15 of 15 pages
- Total equation records: 163 (
MAI-P3-001–MAI-P3-163) - Source equations: 140
- Displayed-equation explanation cards: 99
- Equation statuses:
source-exact,source-suspect,editorially-completed,corrected-variant - Source PDF SHA-256:
2a3855c52d688a79d38e714ab7ef7223dd7a5bc5b46f8385f55da777aa1c78af - New SVG/HTML diagrams preserve figure structures, numbers, and relationships without reproducing original images.
#Reconstructing the PDF source
#3. Backgrounds for AI and deep learning
The chapter begins with a single perceptron, then develops multilayer perceptrons (MLPs), convolutional neural networks (CNNs), global/local matrix representations of convolution, and core PyTorch modules.
#3.1 A single perceptron model
A perceptron mathematically simplifies a biological neuron. The lecture relates dendrites, synapses, and firing thresholds to numerical inputs, weights, weighted sums, and activation functions.
Biological neuron
Perceptron
| Biological neuron | Perceptron |
|---|---|
| Dendrites receive electrical signals from other neurons’ axons. | Represent electrical signals as numerical inputs. |
| Synapses between dendrites and axons modulate signals by different amounts. | Model this by multiplying each input by a weight. |
| Firing occurs when total input exceeds a threshold, and output passes to other neurons. | Calculate a weighted sum, apply an activation such as sign, and pass the output to the next perceptron. |
#3.1.1 Linear discriminant
One perceptron learns a linear boundary between two linearly separable classes. A 2D line is , where coefficient b, not multiplying a coordinate, is the bias.
An N-dimensional point has coordinates , and boundary coefficients are .
Rearranging gives . A more general two-variable linear boundary takes this form.
Source equation · PDF p. 1
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Reference-quality follow-up
Explore this calculation further
The source asks how to rewrite y=ax+c as w₁x₁+w₂x₂+b=0 and leaves ?. The question is preserved, with its completed answer in the editorial layer.
For N-dimensional features, classification uses this hyperplane.
Source equation · PDF p. 2
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Vector notation is Source equation · PDF p. 2 The question this equation answers What does this equation define or connect in the article? Key idea For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure. Formula-specific lesson For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections. Symbols Reference-quality follow-up
Linear discriminants: hyperplanes, signs, and distances
Symbols used in this equation
Symbol Meaning Input or feature vector Learned weight vector Explore this calculation further
The classifier applies a sign decision rule to linear score g.
Source equation · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Its activation is the threshold-type sign function.
Source equation · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Reference-quality follow-up
Explore this calculation further
- The boundary is perpendicular to the weight vector. The PDF writes distance from the origin as .
- The PDF writes distance from point x to the boundary as .
- On the boundary, ; on the positive side indicated by w, ; on the opposite side, .
Let the linearly separable training set be . Correct classification of every sample expands classwise as follows.
Source equation · PDF p. 2
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
This compresses into a zero-empirical-risk condition.
Source equation · PDF p. 2
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#3.1.2 Perceptron learning by gradient descent
The initial learning model starts from a necessary and sufficient condition for zero empirical risk.
Source equation · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
The lecture first constructs reward maximization by increasing the sum of all signed scores.
Source equation · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
It then writes the equivalent loss-minimization problem.
Source equation · PDF p. 2 · Eq. (1)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 2
The sketch shows w perpendicular to the boundary, with perpendicular distance normalized by‖w‖. The notationNo training errorappears beside the signed-margin condition. Other small notes lack sufficient context and remain uncertain to read.
Applying gradient descent to equation (1) requires derivatives with respect to w and b. The source leaves both as ??.
Source notation requires review · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learned weight vector | |
| Partial derivative with respect to a particular variable | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Source notation requires review · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learned weight vector | |
| Partial derivative with respect to a particular variable | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
It then gives these two updates.
Source equation · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The iteration index is ; initial values are chosen arbitrarily.
- Linear separability ensures at least one pair (w,b) satisfying .
- The lecture explains that any solution attaining an equal or smaller value suffices for this gradient-descent objective.
But equation (1) is unbounded below. Once loss is negative, positive scaling of w or b can yield , making the objective numerically unsuitable.
The modified model focuses only on misclassified points, defining an error set each iteration.
Source notation requires review · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Summing loss only over that set gives equation (2).
Source equation · PDF p. 3 · Eq. (2)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
- Signed scores in E are negative, so .
- Since , zero loss means every sample is correctly classified.
Gradient updates likewise use only samples in the error set.
Source equation · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Source notation requires review · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which side of the decision boundary contains input x?
Key idea
Calculate wᵀx+b: positive assigns one class, negative the other, and zero lies on the boundary.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Multiply corresponding features and weights
- 2
Sum the products and add bias
- 3
Check the sign
- 4
Calculate boundary distance if needed
Worked example
Work through the numbers — Classifying one point
w=[1,-2], x=[3,1], and b=0.5.
- 1
Weighted sum
- 2
Class
- 3
Distance to the boundary
Result: The point is on the positive-class side, approximately 0.67 from the boundary.
Sanity check
Checks
- w and x must have the same dimension.
- Geometric distance requires |g(x)|, while signed distance may retain its sign.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 3
Handwritten-Σ yₘxₘand-Σ yₘappear beside the two??placeholders. A lower note connects loss and objective functions as descriptions of the same optimization goal. Some Korean handwriting is blurred and remains uncertain to read.
An alternative learns by minimizing MSE between desired and actual linear responses.
Source equation · PDF p. 4 · Eq. (3)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Here, , the augmented parameters are , and the augmented input is . The source states .
The source leaves this MSE’s gradient as ??.
Source notation requires review · PDF p. 4
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learned weight vector | |
| Partial derivative with respect to a particular variable | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Its LMS-style update accumulates residuals multiplied by inputs.
Source equation · PDF p. 4
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Where should parameters move next to reduce loss?
Key idea
Calculate the gradient at current parameters, multiply by the learning rate, and subtract to obtain new parameters.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Calculation walkthrough
Calculation steps
- 1
Calculate the current loss gradient
- 2
Determine the step size
- 3
Move opposite the direction of increase
- 4
Check the new loss and repeat
Too large a learning rate can diverge; too small is very slow.
Worked example
Work through the numbers — One update
f(w)=(w-3)², current w=5, and learning rate α=0.1.
- 1
Gradient
- 2
Step size
- 3
Update
- 4
Compare losses
Result: One step reduces loss from 4 to 2.56.
Sanity check
Checks
- Check for the minus sign.
- Recording loss before and after updates alongside gradient norm helps detect divergence early.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Learning rate, mixture coefficient, or dual coefficient | |
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The lecture states is necessary but insufficient for convergence and gives typical range . The exact data-dependent upper bound is checked separately in the editorial layer.
#3.2 Nonlinear discriminants: FCNs and MLPs
#3.2.1 Limits of a single perceptron
XOR cannot be solved by one linear boundary. The source places false-class points at and true-class points at .
Geometry shows no single separating line. The source proposes two linear boundaries or a nonlinear boundary such as a quadratic.
Lecture annotation — PDF p. 4
A sketch stackswwithb, andxwith constant 1, into augmented vectors. Beside the MSE blank is derive the gradient directly; beside the learning rate are lower bound / upper bound. Remaining small writing is uncertain to read.
The source asks readers to sketch the geometry of both proposed solutions and leaves the answer blank.
Source notation requires review · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
XOR: one line's limits and two hidden thresholds
Project the four XOR points onto s=x1+x2 to examine the need for two parallel boundaries, keeping source blanks separate from editorial completions.
Reference-quality follow-up
Explore this calculation further
It then asks whether multiple perceptrons can solve XOR and, if so, the minimum number of units.
Source notation requires review · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
XOR: one line's limits and two hidden thresholds
Project the four XOR points onto s=x1+x2 to examine the need for two parallel boundaries, keeping source blanks separate from editorial completions.
Reference-quality follow-up
Explore this calculation further
#3.2.2 MLP overview
Figure 2 depicts a general multilayer network. The lecture defines:
- A column of nodes forms a layer.
- Every node is an artificial neuron.
- A network is fully connected when each node’s output connects to every node in the next layer.
- A network without loops is feedforward.
- Neuron k’s output or activation in layer l is .
The goal is classifying unknown input-image patterns. A network with N_L outputs selects the class with greatest output activation.
Source equation · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#3.2.3 Forward pass
A forward pass maps input x to output-layer values used for classification. Equation (4) gives neuron i’s scalar net input and activation.
Source notation requires review · PDF p. 5 · Eq. (4)
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Output nodes are and the input layer is initialized with .
A footnote allows softmax instead of sigmoid in the final layer. Its activations sum to one and permit probabilistic interpretation.
Source equation · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Probability density or conditional probability density | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 5
Near XOR and forward-pass equations areMLPand arrows indicating activations. Most short symbols and English notes remain uncertain to read because of resolution and overlapping handwriting.
Collecting equation (4) into vector/matrix operations gives the activation/net-input relationship in equation (5).
Source notation requires review · PDF p. 6 · Eq. (5)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
(a) DropOut
(b) DropConnect
Source equation · PDF p. 7
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Dropout versus DropConnect: what is masked?
Use the same W and v to compare forward values when dropout masks activations and DropConnect masks weights.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Class mean or representative point |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 7
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Dropout versus DropConnect: what is masked?
Use the same W and v to compare forward values when dropout masks activations and DropConnect masks weights.
Reference-quality follow-up
Explore this calculation further
Equation (6) defines layer l’s weight matrix, but every source entry remains ??.
Source notation requires review · PDF p. 7 · Eq. (6)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Previous activations are , bias , and net input . The source writes node indices as and inputs as .
To classify N_p patterns together, collect their vectors as columns.
Source equation · PDF p. 7
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
Initial activation is ; the minibatch forward pass follows.
Source notation requires review · PDF p. 7
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
The source gives previous-activation shape and duplicated-bias matrix . Each output column contains one pattern’s output activations.
#Dropout and DropConnect
- Dropout drops activations.
- DropConnect drops weights, introduced as a generalization of dropout.
They mask different locations, as shown in source Figure 3 and its reconstruction.
#3.3 Convolutional neural networks
#3.3.1 Convolution as a core DNN operator
Continuous convolution reflects one function about the vertical axis, shifts it, and integrates the product of both functions.
Source equation · PDF p. 7
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 7
Handwritten additions mask part of the activation vector for dropout and multiply a mask into the weight matrix for DropConnect. The phrases more samples, reduce complexity, and only training are legible. The convolution introduction includes a kernel-flipping sketch.
Engineering often uses notation f(t)*g(t). Discrete convolution has these equivalent definitions.
Source equation · PDF p. 8
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 8
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#3.3.2 Two-dimensional convolution
The Kronecker impulse’s sifting property expresses any 2D discrete signal as a sum of shifted impulses.
Source equation · PDF p. 8
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
For linear shift-invariant systems, superposition sums responses to each shifted impulse.
Source equation · PDF p. 8
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
Thus, a general 2D discrete-space LSI system’s input–output relationship is a 2D convolution sum.
Source equation · PDF p. 8
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Convolution definitions: continuous, discrete, and 2D
Connect a continuous Gaussian example, equivalent discrete sums, delta/LSI interpretations, and full 2D convolution in one view.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The source’s boxed note: An LSI system is fully specified by its impulse response.
#Computing 2D convolution
- Flip h[k,l] about the origin to obtain .
- Shift it by m,n to obtain .
- Multiply the shifted kernel and f[k,l] elementwise.
- Sum over every k,l.
- Repeat for every output location m,n.
Paper mathematics permits infinite images, but computers handle finite-support images implicitly zero outside a rectangle. MATLAB conv2 requires users to track the origin.
Full convolution of M₁×N₁ and M₂×N₂ images has size:
Source equation · PDF p. 8
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Reference-quality follow-up
Explore this calculation further
The option conv2(..., "same") discards boundary pixels to match the first input’s size.
Lecture annotation — PDF p. 8
The top sketches a flipped, shifted 1D kernel; the right side shows input/kernel grids and summation of products. The meaning offlipand weighted sums is clear, but some Korean explanations remain uncertain to read.
The first example calculates full convolution g from given h and f.
Source equation · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
Source notation requires review · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
Source notation requires review · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
The second applies a 3×3 moving-average system to an infinite checkerboard.
Source equation · PDF p. 9
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
The input alternates +1 and −1.
Source equation · PDF p. 9
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Source notation requires review · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
#Computation and separability
The source approximates operation count for convolving N₁×M₁ and N₂×M₂ images as follows.
Source equation · PDF p. 9
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Reference-quality follow-up
Explore this calculation further
For N₁=M₁=N much larger than kernel size M, this is roughly .
A separable kernel permits rearranging the double sum into two 1D convolutions.
Source equation · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
- The inner sum applies h₂ along each column.
- The outer sum applies h₁ along each intermediate row.
For a large N×N image and small separable M×M kernel, cost is roughly . The source states an approximately -fold computational gain.
Since M is usually at least three, the source asks for the minimum reduction as and leaves it blank.
#3.3.3 A global matrix representation of convolution
Begin with 1D convolution for simplicity.
Source equation · PDF p. 9 · Eq. (7)
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The aim is to express a DSP relationship as matrix–vector multiplication.
Source equation · PDF p. 9 · Eq. (8)
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Target or observation vector | |
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
For N≥M, a footnote says carefully implemented convolution of N- and M-point signals requires and nearly as many additions.
Lecture annotation — PDF p. 9
Above the first example is a handwritten 180°-rotated kernel[[3,2,1],[6,4,2]], with calculated entries in part of the output grid. Factorization / outer product appears beside separability, and lower notes connect periodic convolution with Fourier transforms. Some overlapping frequency-domain expressions remain uncertain to read.
Zero
4 2 0 0 0 0 1 4 2 0 0 0 0 1 4 2 0 0 0 0 1 4 2 0 0 0 0 1 4 2 0 0 0 0 1 4
Extended
1 4 2 0 0 0 0 0 0 1 4 2 0 0 0 0 0 0 1 4 2 0 0 0 0 0 0 1 4 2 0 0 0 0 0 0 1 4 2 0 0 0 0 0 0 1 4 2
Periodic
4 2 0 0 0 1 1 4 2 0 0 0 0 1 4 2 0 0 0 0 1 4 2 0 0 0 0 1 4 2 2 0 0 0 1 4
Source equation · PDF p. 10
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 10
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 10
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
Source equation · PDF p. 10
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
Vectors y and x have finite column length, and h[n] determines A. Although mathematical convolution allows arbitrary indices, finite storage requires choosing A and x according to boundary conditions.
In every case, vectorize measurements g[n] as follows.
Source equation · PDF p. 10 · Eq. (9)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
Matrix indices start at one and signal indices at zero, giving . Define noise vectors similarly.
The example’s three-point impulse response is:
Source equation · PDF p. 10
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
The Kronecker impulse is this piecewise function.
Source equation · PDF p. 10
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
#Zero boundary conditions
The simplest model assumes and restricts convolution to . This is also called a Dirichlet boundary condition.
Source equation · PDF p. 10 · Eq. (10)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 10
Handwriting above the matrices contrasts zero, extended, and periodic boundaries and marks circular boundaries. Some numbers match the source matrix, but most overlapping prose remains uncertain to read.
Equation (10)‘s N×N A is Toeplitz, constant along each diagonal. The source cites references [1,2] for relatively fast algorithms handling these matrices.
Source equation · PDF p. 11
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
For shift-invariant problems, pass h and f to a convolution routine rather than storing A explicitly. Matrix notation remains useful for analysis.
For shift-variant problems, A may be stored explicitly, with sparse representations efficient when h has few nonzero entries.
#Extended boundary conditions
In optical imaging, PSF spreading lets scenes outside the measured field of view affect observations. Zero boundaries can be unrealistic; regularization or constraints may recover parts of an object vector longer than the measurement vector.
Source equation · PDF p. 11 · Eq. (11)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
A has shape , with L=3 here. The author considers extended boundaries the most realistic choice for many restoration problems when feasible.
MATLAB note: for row vector , convmtx(fliplr(b), N) constructs this A. It relates to the valid option of 2D conv2.
#Periodic boundary conditions
Another choice assumes . Though rarely exact for real images, it is useful in frequency-domain analysis.
Source equation · PDF p. 11
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The periodically overlapped and summed impulse response is equation (12).
Source equation · PDF p. 11 · Eq. (12)
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
The footnote defines modulo and floor as follows.
Source equation · PDF p. 11
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 11
Marks around Toeplitz, extended, and periodic boundaries connect Fourier analysis and circulant structure. Complete sentences cannot be reliably transcribed and remain uncertain to read.
Assuming the blur kernel vanishes for |n|≥N simplifies equation (12) as follows.
Source equation · PDF p. 11
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
Circular convolution’s N×N system matrix is circulant, as in equation (13).
Source equation · PDF p. 11 · Eq. (13)
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
Its entries satisfy , described as an approximation of Toeplitz form.
#Mirror conditions
The source prints reflective boundaries as Nuemann boundary conditions. The usual term is Neumann boundary conditions: mirror the signal at both boundaries.
Source equation · PDF p. 11
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Global convolution matrices: zero, extended, periodic, and mirror boundaries
Use h[-1]=2, h[0]=4, h[1]=1, and N=6 to compare Toeplitz, extended, and circulant matrices and boundary outputs for the same x.
Reference-quality follow-up
Explore this calculation further
#2D matrix-vector representations
The principle extends to 2D and higher dimensions. A becomes more complicated, but both 1D and 2D retain matrix–vector form .
#3.3.4 Local or patch-based convolution representation
Input f includes padding and has size . Output g has the unpadded input’s pixel count, .
Define the P-location neighborhood of pixel s as window W(s).
Source equation · PDF p. 12
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Reference-quality follow-up
Explore this calculation further
Here, denotes an index neighbor.
The text defines z_s as a column of f’s window pixels, but its printed expression uses y. That source notation is preserved.
Source notation requires review · PDF p. 12
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Target or observation vector |
Reference-quality follow-up
Explore this calculation further
The column h collects filter parameters.
Source equation · PDF p. 12
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Interior pixels are defined by , , and .
Stacking patches as rows gives design matrix Z.
Source equation · PDF p. 12
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 12
The top sketches FCN weight shapes, the middle compares zero/circular system matrices, and the bottom shows patch extraction → dot product: flatten an image patch and dot it with a filter for one output. Some blue Korean notes remain uncertain to read.
The source’s stacked output vector contains an isolated x before its last entry.
Source notation requires review · PDF p. 13
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
It then states and summarizes patch convolution in one line.
Source equation · PDF p. 13
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Reference-quality follow-up
Explore this calculation further
#3.4 Core DNN modules
DNNs chain or repeat operators. The lecture recommends assembling networks from these layers in PyTorch’s torch.nn documentation.
nn.Linear: fully connected networks or MLPs.
nn.Conv2d: CNNs;out_channelsandkernel_sizecontrol feature count and filter size.
nn.ConvTranspose2d: upsampling through transposed convolution.
nn.ReLU: interlayer nonlinearity through .
nn.MaxPool2dandnn.AvgPool2d: two pooling types.
nn.Upsample: interpolation-based activation-map enlargement, common in U-Net.
nn.Dropout: reducing overfitting.
#PyTorch convolution
The source includes API-signature screenshots for Conv1d, Conv2d, and Conv3d. Its example settings follow.
The screenshots each show [SOURCE] at right for documentation links. Visible signatures are transcribed below, but absent active URI annotations prevent reliable destination recovery.
torch.nn.Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
torch.nn.Conv3d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros', device=None, dtype=None)
Source equation · PDF p. 13
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Total class count or a matrix; check context |
Reference-quality follow-up
Explore this calculation further
Lecture annotation — PDF p. 13
Read by myself appears beside core modules. Arrows connectConvTranspose2dwith kernel flipping, and notes point to ReLU and layers; some remain uncertain to read.
Step 2 on PDF p. 14 continues the same 3×3 filter at the next spatial position, filling an output voxel.
#3.4.1 PyTorch max pooling
The source shows MaxPool1d, MaxPool2d, and MaxPool3d signatures, then calculates a 2D example in stages with these settings.
Each MaxPool screenshot also shows [SOURCE] at right. The visible signatures follow; only their displayed text is recorded because link URIs are absent.
torch.nn.MaxPool1d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
torch.nn.MaxPool2d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
torch.nn.MaxPool3d(kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False)
Padded input
0 0 0 0 0 0 0 0 1 3 2 3 3 0 0 3 1 2 1 1 0 0 3 3 3 1 2 0 0 2 2 1 2 1 0 0 2 3 2 1 2 0 0 0 0 0 0 0 0
3×3 window
stride 2
padding 1
→
Source-visible progress
Step 1: 3 · ·
· · ·
· · ·
Step 2: 3 3 ·
· · ·
· · ·Source notation requires review · PDF p. 15
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
#References in the lecture material
- R. H.-F. Chan and X.-Q. Jin, An Introduction to Iterative Toeplitz Solvers. Society for Industrial and Applied Mathematics, 2007.
- W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C, 2nd ed., Cambridge, U.K., 1992.
- P. C. Hansen, J. G. Nagy, and D. P. O’Leary, Deblurring Images: Matrices, Spectra, and Filtering. SIAM, 2006, vol. 3.
- I. Y. Chun and J. A. Fessler, “Convolutional dictionary learning: Acceleration and convergence,” IEEE Transactions on Image Processing, 27(4), 1697–1712, 2018, DOI 10.1109/TIP.2017.2761545.
- I. Y. Chun and J. A. Fessler, “Convolutional analysis operator learning: Acceleration and convergence,” IEEE Transactions on Image Processing, 29, 2108–2122, 2020, DOI 10.1109/TIP.2019.2937734.
The PDF shows this link, Wiki, and PyTorch documentation references, but not every URI can be recovered reliably. Visible source labels are preserved without inventing destinations.
#Editorial and mathematical audit
#Completing the general line equation
Set x₁=x and x₂=y and move all terms to one side to complete ? on PDF p. 1.
Completed source placeholder · PDF p. 1
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Reference-quality follow-up
Explore this calculation further
#Absolute value in origin-to-hyperplane distance
The source’s b/‖w‖₂ can be signed. Geometric distance requires its absolute value.
Mathematically corrected variant · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Magnitude of a vector or error |
Reference-quality follow-up
Explore this calculation further
#Absolute value in point-to-hyperplane distance
g(x)/‖w‖₂ is signed distance; geometric distance is |g(x)|/‖w‖₂.
Mathematically corrected variant · PDF p. 2
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Formula-specific lesson
Linear discriminants: hyperplanes, signs, and distances
For the same w, b, and x, calculate scores, sign classifications, signed/absolute distances, and separation margins, distinguishing source distance notation from corrections.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Magnitude of a vector or error |
Reference-quality follow-up
Explore this calculation further
#Completing the perceptron w gradient
Differentiating equation (1) with respect to w gives the negative sum of yₘxₘ.
Completed source placeholder · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| Partial derivative with respect to a particular variable | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#Completing the perceptron b gradient
Differentiating equation (1) with respect to b gives the negative label sum.
Completed source placeholder · PDF p. 3
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Partial derivative with respect to a particular variable | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#Completing the MSE gradient
Apply the chain rule to half the squared residual.
Completed source placeholder · PDF p. 4
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How much does the objective increase or decrease when each parameter increases?
Key idea
Collect partial derivatives into a vector and move in the opposite direction during minimization.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Calculation walkthrough
Calculation steps
- 1
Choose the differentiation variable
Treat other variables as constants.
- 2
Apply sum, product, and chain rules
For composition, multiply the outer derivative by the inner derivative.
- 3
Collect partial derivatives into one vector
- 4
Substitute current values
Obtain numerical gradient magnitudes and signs.
Worked example
Work through the numbers — Gradient of a one-dimensional loss
The loss squares distance from target value 3.
- 1
Function
- 2
Derivative
- 3
Substitute w=5
Result: The positive gradient 4 means decreasing w reduces loss.
Sanity check
Checks
- The gradient and parameter vectors must have matching lengths.
- A constant term has derivative zero.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector | |
| A gradient collecting derivatives in each variable direction | |
| Sum over all specified terms | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#A data-dependent learning-rate correction
A fixed 0 < α < 2 alone cannot guarantee general MSE convergence. The largest Hessian eigenvalue determines the upper bound.
Mathematically corrected variant · PDF p. 4
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Data matrix collecting samples | |
| Regularization strength or eigenvalue | |
| Learning rate, mixture coefficient, or dual coefficient |
Reference-quality follow-up
Explore this calculation further
#Completing XOR’s two-line boundary
Separate points between two parallel lines from those outside using x₁+x₂ to match the source classes.
Completed source placeholder · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
XOR: one line's limits and two hidden thresholds
Project the four XOR points onto s=x1+x2 to examine the need for two parallel boundaries, keeping source blanks separate from editorial completions.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector |
Reference-quality follow-up
Explore this calculation further
#Minimum units for XOR
A standard threshold network uses two hidden units and one output unit.
Completed source placeholder · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
XOR: one line's limits and two hidden thresholds
Project the four XOR points onto s=x1+x2 to examine the need for two parallel boundaries, keeping source blanks separate from editorial completions.
Reference-quality follow-up
Explore this calculation further
#Completing weight-matrix equation (6)
Rows correspond to current-layer neurons and columns to previous-layer activations.
Completed source placeholder · PDF p. 7
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
#Correcting scalar forward-pass indices
Use N_l for current-layer width and N_{l−1} for previous-layer width.
Mathematically corrected variant · PDF p. 5
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sum over all specified terms |
Reference-quality follow-up
Explore this calculation further
#Correcting vector forward-pass dimensions
Activations, net inputs, and biases all have current-layer width N_l.
Mathematically corrected variant · PDF p. 6
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Reference-quality follow-up
Explore this calculation further
#Correcting batch forward-pass dimensions
Separate minibatch column count N_p from current-layer width N_l.
Mathematically corrected variant · PDF p. 7
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
MLP forward: scalar → matrix → batch → softmax
Calculate one 2→3→2 network simultaneously in scalar, matrix, and batch forms, distinguish N_l/N_L notation, and check softmax sums and argmax.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Linear transformation or coefficient matrix |
Reference-quality follow-up
Explore this calculation further
#Completing the flipped 2D kernel
Mathematical 2D convolution rotates the kernel 180° about the origin.
Completed source placeholder · PDF p. 9
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How can a nonlinear relationship become a similarity score usable by a linear model?
Key idea
Use input distances or feature-space inner products to produce scalar similarity κ(u,v).
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Calculate the difference between inputs
- 2
Calculate squared distance
- 3
Divide by the kernel-width factor
- 4
Apply a negative exponential for similarity
Worked example
Work through the numbers — The RBF kernel
u=[0,0], v=[1,1], and σ=1.
- 1
Squared distance
- 2
Exponentiation
Result: The points' RBF similarity is approximately 0.368.
Sanity check
Checks
- For u=v, the RBF kernel equals one.
- Very small σ makes most distinct points nearly zero in similarity; very large σ makes them similar.
Reference-quality follow-up
Explore this calculation further
#Completing the full 2D convolution grid
Sum overlapping-entry products at every position to obtain the 5×7 full output.
Completed source placeholder · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
#Checkerboard response to a moving average
A 3×3 window contains five matching and four opposite signs, leaving one ninth of the original sign.
Completed source placeholder · PDF p. 9
Explanation and calculations 5 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How do filter weights summarize each location's neighborhood?
Key idea
Flip and shift the kernel, then sum products of overlapping entries. CNN implementations commonly use unflipped cross-correlation.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Calculation walkthrough
Calculation steps
- 1
Check kernel orientation and boundary conditions
First distinguish mathematical convolution from CNN-style cross-correlation.
- 2
Align the kernel with an output position
Stride and padding determine the overlapping input region.
- 3
Multiply overlapping entries
- 4
Sum the products
- 5
Move to the next position and repeat
In 2D, perform the same operation over horizontal and vertical indices.
Worked example
Work through the numbers — 1D full convolution
Use signal [1,2,3] and kernel [1,1].
- 1
First position
- 2
Second position
- 3
Third position
- 4
Last position
Result: The full output is [1,3,5,3].
Note: Same or valid padding changes output length.
Sanity check
Checks
- Output size depends on kernel, padding, stride, and dilation.
- Keep kernel-flipping conventions consistent between code and equations.
Reference-quality follow-up
Explore this calculation further
#Reduction from separable convolution
Replacing M² operations by 2M gives reduction fraction 1−2/M.
Completed source placeholder · PDF p. 9
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
2D convolution exercise·moving average·separability
Use the PDF's exact 2×3 kernel and 4×5 image to complete mirrored-kernel and full-output blanks, checking checkerboard averaging and separability savings.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#Correcting f/y in the patch vector
This variant changes y_W(s) to f_W(s), matching the surrounding definition.
Mathematically corrected variant · PDF p. 12
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Reference-quality follow-up
Explore this calculation further
#Correcting the output vector’s last entry
Remove the isolated x and use one consistent s-index rule throughout.
Mathematically corrected variant · PDF p. 13
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Reference-quality follow-up
Explore this calculation further
#Completing the 3×3 MaxPool output grid
Calculate source-blank cells with the same window, stride, and padding rules.
Completed source placeholder · PDF p. 15
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
Which products and sums of inputs form each output entry?
Key idea
Multiply corresponding entries of one left-matrix row and one right-matrix column, then sum.
Formula-specific lesson
Patch matrix → Conv2d → MaxPool
Stack local windows into Z for g=Zh, then check the 64×64 3×3 Conv2d dimensions and parameter count alongside the PDF's 5×5 MaxPool example.
Calculation walkthrough
Calculation steps
- 1
Check multiplication compatibility
The inner dimensions must agree.
- 2
Choose one output position
Output entry (i,j) uses row i of A and column j of B.
- 3
Multiply matching indices and sum
- 4
Repeat for every row–column pair
Apply the procedure across the entire output matrix.
Worked example
Work through the numbers — Multiplying a 2×2 matrix by a vector
Use numbers to see how each row transforms the vector.
- 1
Input
- 2
First row
- 3
Second row
Result: The result is Ax=[17,39]^T.
Sanity check
Checks
- Changing multiplication order generally changes the result.
- Output shape is the outer dimensions m×p.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Data matrix collecting samples |
Reference-quality follow-up
Explore this calculation further
#Nonnegativity of MSE loss
The source calls squared-sum loss always positive, but exact fitting permits zero; nonnegative is precise.
Mathematically corrected variant · PDF p. 4
Explanation and calculations 4 calculation steps · Numerical example · Checks included · Formula-specific lesson
The question this equation answers
How far are predictions from targets on average?
Key idea
Subtract targets from predictions, square each residual, and divide by sample count. Larger errors receive greater penalties.
Formula-specific lesson
Alternative MSE learning: residuals, gradients, and step sizes
Sum augmented-vector MSE from a residual table and verify completed gradients and the data-dependent learning-rate bound from Hessian λmax.
Calculation walkthrough
Calculation steps
- 1
Calculate predictions
For linear regression, predictions are Xw or wᵀx.
- 2
Calculate residuals
- 3
Square the residuals
Remove signs and emphasize larger errors.
- 4
Sum and divide by sample count
Worked example
Work through the numbers — MSE for two samples
Compare predictions and targets directly.
- 1
Targets and predictions
- 2
Residual
- 3
Square
- 4
Average
Result: MSE is 5. The second sample's error of 3 substantially increases it.
Sanity check
Checks
- Check whether the expression divides by sample count or is merely a sum of squares.
- MSE has squared output units.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Learned weight vector | |
| Sample count or loss function; check context |
Reference-quality follow-up
Explore this calculation further
#Including zero margin in the error set
With labels ±1, g(x)=0 produces sign output zero and is not correct classification. A companion variant extends the initial strict <0 to ≤0.
Mathematically corrected variant · PDF p. 3
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
#Including zero margin in each iteration’s error set
For the same reason, iteration-specific error sets should include zero-margin patterns.
Mathematically corrected variant · PDF p. 3
Explanation Core explanation · Formula-specific lesson
The question this equation answers
What does this equation define or connect in the article?
Key idea
For equations without an actual calculation or derivation, briefly clarify context and symbols rather than attaching a generic procedure.
Formula-specific lesson
Perceptron losses, gradients, and error-set updates
For the same ±1-labeled samples, calculate margins, source losses, completed gradients, full-sample updates, and error-set updates. Zero-margin initialization reveals the difference between original <0 and corrected ≤0 sets.
Symbols
Symbols used in this equation
| Symbol | Meaning |
|---|---|
| Input or feature vector | |
| Learned weight vector |
Reference-quality follow-up
Explore this calculation further
#Research update: August 18, 2026
This is not PDF source material. It extends the perceptron, MLP, CNN, and convolution topics through peer-reviewed papers, proceedings, and official implementation documents available by August 18, 2026, without rewriting source claims retroactively.
#1. Activation and normalization extend far beyond ReLU alone
The lectures introduce sign and ReLU. Practice now includes GELU, SiLU/Swish, gated and task-specific activations, while normalization choices include LayerNorm, RMSNorm, GroupNorm, and Global Response Normalization (GRN), selected for architecture and batch regime.
- BatchNorm — ICML 2015, peer-reviewed: a foundational method stabilizing training through minibatch statistics. PMLR paper
- RMSNorm — NeurIPS 2019, peer-reviewed: removes recentering and normalizes by root mean square, simplifying LayerNorm computation. Official proceedings
- ConvNeXt V2 — CVPR 2023, peer-reviewed: jointly designs a fully convolutional masked autoencoder and GRN to strengthen interchannel feature competition. CVF paper
- Transformers without Normalization — CVPR 2025, peer-reviewed: Dynamic Tanh replaces normalization with an elementwise tanh mapping, reporting comparable or better results in several vision/language settings. This challenges universal necessity claims without providing a universal removal method for all CNNs and MLPs. CVF paper
- Dynamic Group Normalization — CVPR 2025, peer-reviewed: adapts channel groups during training according to statistics rather than fixing them. CVF paper
- Stronger Normalization-Free Transformers — CVPR 2026, peer-reviewed: systematically compares pointwise stabilizing functions after DyT, expanding normalization-free design beyond one tanh alternative. CVF paper
- AcTTA — CVPR 2026, peer-reviewed: adapts ReLU/GELU thresholds and gradient sensitivity at test time rather than relying only on normalization affine parameters, making activations themselves targets of shift adaptation. CVF paper
Evaluate activation and normalization together with gradient scale, residual paths, batch size, pretraining objectives, and hardware kernels, rather than as isolated decorations.
#2. CNN versus Transformer: combining biases and recipes rather than declaring an intrinsically superior operator
- ConvNeXt — CVPR 2022, peer-reviewed: progressively modernizes ResNet with Transformer-era training and blocks, showing pure ConvNets can compete with Swin-family models. CVF paper
- ConvNeXt V2 — CVPR 2023: demonstrates joint architecture and self-supervised-pretraining design rather than separate optimization.
- ShiftwiseConv — CVPR 2025, peer-reviewed: decomposes large-kernel benefits into feature granularity and multipath fusion, building long-range sparse dependencies with small 3×3 kernels. CVF paper
- MobileNetV4 — ECCV 2024, peer-reviewed: integrates inverted bottlenecks, ConvNeXt, FFNs, and extra depthwise designs in one Universal Inverted Bottleneck search block and evaluates accelerator-aware attention. ECVA paper
- ConvNeur — CVPR 2026, peer-reviewed: separates global reasoning and locality-preserving representations into gated branches, treating CNNs and attention as complementary roles. CVF paper
Comparisons require matched throughput, latency, memory bandwidth, accelerator mapping, detection/segmentation transfer, pretraining data, and recipes, beyond parameter counts or ImageNet top-1 alone.
#3. Gradient descent selects more than just any minimum: implicit bias and feature learning
Perceptron updates specify a rule, but overparameterized networks admit many equal-training-loss solutions. Selection depends on optimizer, initialization, parameterization, batch size, and weight decay.
- Soudry et al. — JMLR 2018, peer-reviewed: prove max-margin implicit bias: gradient-descent directions converge to the hard-margin SVM solution in separable logistic regression. JMLR paper
- Tensor Programs IV — ICML 2021, peer-reviewed: gives parameterization-dependent conditions retaining feature learning rather than a kernel regime at infinite width. PMLR paper
- Critical feature learning — ICML 2024, peer-reviewed: analyzes wide-network feature-learning regimes through scaling. PMLR paper
- SGD with Weight Decay Secretly Minimizes the Ranks of Your Neural Networks — CPAL 2025, peer-reviewed: reports theoretical and experimental low-rank bias strengthened by small batches, large learning rates, and strong decay. PMLR paper
- How Does the ReLU Activation Affect the Implicit Bias… — COLT 2026, peer-reviewed: analyzes conditions for near-minimum-ℓ₂-norm interpolation and rapid activation-pattern stabilization in shallow ReLU regression on high-dimensional random data. Activations and data spectra jointly shape implicit bias. PMLR paper
- When Both Layers Learn — COLT 2026, peer-reviewed: studies dynamics toward global minima from random initialization and sample complexity when both layers of a one-hidden-layer ReLU network learn, providing a simplified end-to-end feature-learning theory. PMLR paper
Reducing training loss and learning particular representations are separate questions. Extend the lecture’s updates by measuring margins, norms, rank, feature drift, and lazy/rich regimes.
#4. Efficient convolution: from separability to depthwise, grouped, and reparameterized designs
PDF p. 9 reduces M² operations to 2M through separability. Modern CNNs extend efficiency choices into channels.
- Depthwise convolution filters each channel spatially; pointwise 1×1 convolution mixes channels.
- Grouped convolution partitions channels to control connections and computation.
- Structural reparameterization trains multiple branches and algebraically fuses them into one convolution before inference. RepVGG exemplifies this, followed by mobile and large-kernel architectures. RepVGG, CVPR 2021
- MobileNetV4 codesigns blocks for Pareto frontiers on CPUs, DSPs, GPUs, and NPUs.
- ShiftwiseConv offers another route to large-kernel effects through small operators.
- PFGNet — CVPR 2026, peer-reviewed: decomposes spatially adaptive large-kernel responses into separable
1×kandk×1convolutions, reducing per-channel cost fromO(k²)toO(2k). This directly extends classical separability into dynamic receptive-field design. CVF paper
Lower FLOPs do not guarantee lower latency. Measure memory access, kernel launches, fusion, group counts, and target hardware together.
#5. What PyTorch convolution actually computes
The lecture moves from kernel-flipped mathematical convolution to PyTorch Conv2d. Keep these conventions separate.
- Official PyTorch
Conv2dcomputes valid 2D cross-correlation, without mathematical kernel flipping. Official documentation ConvTranspose2dcan be viewed as the input gradient ofConv2dbut is not the actual inverse of convolution. With stride greater than one, it inserts zeros between input elements. Official documentationMaxPool2dpadding is conceptually negative infinity, preventing zero padding from incorrectly becoming the maximum for negative inputs. Official documentationDropoutzeros elements with a Bernoulli mask during training and scales retained values by1/(1-p), yielding identity behavior during evaluation. Official documentation
When comparing papers, DSP libraries, and frameworks, specify flipping, padding, tensor layout, groups, dilation, bias, and train/eval mode.
#6. Open research questions
- Under matched compute, data, and training, how do CNN/Transformer biases differ for OOD performance, robustness, and dense prediction?
- Which activation, residual-scaling, and optimizer conditions maintain stability when normalization changes or is removed?
- Which margin, rank, or feature-movement measurements best predict downstream generalization?
#Key terms
- Perceptron convergence: finite-mistake or convergence properties under linear separability and specified update rules.
- Feature learning: hidden representations adapting to the task rather than merely fitting linear models over fixed kernels.
- Structural reparameterization: exactly combining multiple training branches into a single inference operator.
- Depthwise separable convolution: separating spatial filtering from channel mixing for efficiency.
- Cross-correlation convention: sliding dot products without kernel flipping, as used in deep-learning frameworks.