<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deep Learning | Portfolio</title><link>https://ansangah.github.io/en/tags/deep-learning/</link><atom:link href="https://ansangah.github.io/en/tags/deep-learning/index.xml" rel="self" type="application/rss+xml"/><description>Deep Learning</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en</language><lastBuildDate>Wed, 22 Oct 2025 00:00:00 +0000</lastBuildDate><image><url>https://ansangah.github.io/media/sharing.png</url><title>Deep Learning</title><link>https://ansangah.github.io/en/tags/deep-learning/</link></image><item><title>📁 Chapter 2: Feedforward Neural Network (FNN) Summary</title><link>https://ansangah.github.io/en/blog/ai-blog/2fnn/</link><pubDate>Wed, 22 Oct 2025 00:00:00 +0000</pubDate><guid>https://ansangah.github.io/en/blog/ai-blog/2fnn/</guid><description>&lt;h2 id="1-overview-of-feedforward-neural-networks-fnn"&gt;1. Overview of Feedforward Neural Networks (FNN)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FNN&lt;/strong&gt; = Feedforward Neural Network (also called Fully Connected Neural Network).&lt;br&gt;
Most FNNs adopt a fully connected architecture, so the two terms are often used interchangeably.&lt;/li&gt;
&lt;li&gt;It is another name for the &lt;strong&gt;Multilayer Perceptron (MLP)&lt;/strong&gt;, the most fundamental form of an artificial neural network.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Universal Approximation Theorem&lt;/strong&gt;:&lt;br&gt;
With a sufficient number of hidden neurons and an appropriate activation function, an FNN can approximate any &lt;em&gt;n&lt;/em&gt;-dimensional continuous function to an arbitrary degree of accuracy.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="2-structure-and-design-of-fnn"&gt;2. Structure and Design of FNN&lt;/h2&gt;
&lt;p&gt;An FNN has &lt;strong&gt;unidirectional data flow&lt;/strong&gt; — signals move only forward.&lt;br&gt;
Each neuron performs &lt;em&gt;weighted summation → activation function&lt;/em&gt;.&lt;br&gt;
Importantly, it assumes independence among data points (no recurrent connections).&lt;/p&gt;
&lt;h3 id="21-layer-structure"&gt;2.1 Layer Structure&lt;/h3&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Layer Structure"
srcset="https://ansangah.github.io/blog/ai-blog/2fnn/image_hu_d2afa73b8980d80d.webp 320w, https://ansangah.github.io/blog/ai-blog/2fnn/image_hu_92045be633531587.webp 369w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://ansangah.github.io/blog/ai-blog/2fnn/image_hu_d2afa73b8980d80d.webp"
width="369"
height="248"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Input layer&lt;/strong&gt;: receives external data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hidden layer(s)&lt;/strong&gt;: extracts features&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output layer&lt;/strong&gt;: produces predictions or classifications&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Usually there is one input and one output layer;&lt;br&gt;
the &lt;strong&gt;number of hidden layers&lt;/strong&gt; varies depending on task complexity.&lt;/p&gt;
&lt;h3 id="22-fully-connected-fc-layers"&gt;2.2 Fully Connected (FC) Layers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Every neuron in one layer is &lt;strong&gt;connected to every neuron&lt;/strong&gt; in the previous layer.&lt;/li&gt;
&lt;li&gt;Even with the same input, different neurons extract &lt;strong&gt;different features&lt;/strong&gt; — more neurons allow richer representation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Weighted summation&lt;/strong&gt;: assigns greater weights to important features.&lt;br&gt;
$$
z = \sum_i w_i x_i + b
$$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Activation function&lt;/strong&gt;: introduces nonlinearity, essential for learning complex patterns (e.g., XOR).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="23-relu-rectified-linear-unit"&gt;2.3 ReLU (Rectified Linear Unit)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;$$x &amp;gt; 0 \Rightarrow x,\quad x \le 0 \Rightarrow 0$$&lt;/li&gt;
&lt;li&gt;Computationally efficient and stabilizes training.&lt;/li&gt;
&lt;li&gt;Neural networks must be differentiable (or piecewise differentiable) to allow backpropagation.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="24-universal-approximation-and-network-depth"&gt;2.4 Universal Approximation and Network Depth&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Even a 2-layer FNN can approximate continuous functions with enough hidden neurons.&lt;/li&gt;
&lt;li&gt;However, increasing neurons arbitrarily leads to &lt;strong&gt;overfitting&lt;/strong&gt; →&lt;br&gt;
stacking deeper layers can achieve the same performance with fewer neurons.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="25-design-checklist"&gt;2.5 Design Checklist&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Input shape&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Output shape / activation function&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hidden-layer activation function&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network size&lt;/strong&gt; (depth &amp;amp; width)&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id="3-classification-vs-regression"&gt;3. Classification vs. Regression&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Classification&lt;/strong&gt;: predicts a &lt;em&gt;category (class)&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regression&lt;/strong&gt;: predicts a &lt;em&gt;continuous value&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Classification can be viewed as a &lt;strong&gt;discriminant function&lt;/strong&gt; (decision boundary) or a &lt;strong&gt;probabilistic model&lt;/strong&gt; (predicting class probabilities).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="4-binary-classification-model"&gt;4. Binary Classification Model&lt;/h2&gt;
&lt;p&gt;Binary classification models predict a &lt;strong&gt;Bernoulli distribution&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Output activation: &lt;strong&gt;Sigmoid&lt;/strong&gt;&lt;br&gt;
$$\sigma(z) = \frac{1}{1 + e^{-z}}$$&lt;/li&gt;
&lt;li&gt;Loss function: &lt;strong&gt;Binary Cross-Entropy&lt;/strong&gt;, which pairs naturally with the sigmoid output.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="5-multi-class-classification-model"&gt;5. Multi-class Classification Model&lt;/h2&gt;
&lt;p&gt;Multi-class classification predicts a &lt;strong&gt;categorical (multinomial)&lt;/strong&gt; distribution.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Output activation: &lt;strong&gt;Softmax&lt;/strong&gt;&lt;br&gt;
$\mathrm{softmax}(z)_k = \frac{e^{z_k}}{\sum_j e^{z_j}}$&lt;/li&gt;
&lt;li&gt;Loss function: &lt;strong&gt;Categorical Cross-Entropy&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;Note: Binary classification can also be expressed as a 2-dimensional softmax,&lt;br&gt;
but it’s typically simplified to a 1-dimensional sigmoid model.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="6-regression-model"&gt;6. Regression Model&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Regression often assumes observation noise follows a &lt;strong&gt;Gaussian distribution&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The model usually predicts the &lt;strong&gt;mean ( \mu = y(x) )&lt;/strong&gt; only (variance is treated as constant).&lt;/li&gt;
&lt;li&gt;Output activation: &lt;strong&gt;Identity function&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="7-input-layer"&gt;7. Input Layer&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;If the input is an &lt;em&gt;n&lt;/em&gt;-dimensional vector, the input layer should have &lt;em&gt;n&lt;/em&gt; neurons.&lt;/li&gt;
&lt;li&gt;Example: a 28×28 image is &lt;strong&gt;flattened&lt;/strong&gt; into a 784-dimensional input vector.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="8-summary-of-activation-functions"&gt;8. Summary of Activation Functions&lt;/h2&gt;
&lt;h3 id="81-sigmoid-family"&gt;8.1 Sigmoid Family&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Pros: differentiable everywhere, squashes values into [0, 1].&lt;/li&gt;
&lt;li&gt;Cons: exponential computation cost, &lt;strong&gt;gradient saturation/vanishing&lt;/strong&gt;,&lt;br&gt;
outputs are positive → optimization path may oscillate.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="82-hyperbolic-tangent-tanh"&gt;8.2 Hyperbolic Tangent (tanh)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Range [-1, 1], reducing oscillation in optimization.&lt;/li&gt;
&lt;li&gt;Still suffers from exponential computation and saturation problems.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="83-relu-family"&gt;8.3 ReLU Family&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ReLU&lt;/strong&gt;: fast, robust to saturation/vanishing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Leaky ReLU / PReLU&lt;/strong&gt;: assigns small slope in negative region to mitigate “dead ReLU.”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ELU&lt;/strong&gt;: exponential negative region — stable even for large negative inputs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maxout&lt;/strong&gt;: neuron output = max of several linear functions → activation is &lt;em&gt;learned&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Swish (SiLU)&lt;/strong&gt;: (x \cdot \sigma(x)); modern nonlinearity with strong empirical performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="9-network-size-width--depth"&gt;9. Network Size (Width &amp;amp; Depth)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Width&lt;/strong&gt;: number of neurons per layer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Depth&lt;/strong&gt;: number of layers&lt;/li&gt;
&lt;li&gt;Search strategies: &lt;strong&gt;Random Search&lt;/strong&gt; is generally more efficient than exhaustive &lt;strong&gt;Grid Search&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Modern approaches include &lt;strong&gt;Neural Architecture Search (NAS)&lt;/strong&gt; for automated structure optimization.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="91-scaling-strategy"&gt;9.1 Scaling Strategy&lt;/h3&gt;
&lt;p&gt;As demonstrated by &lt;strong&gt;EfficientNet&lt;/strong&gt;, jointly scaling &lt;strong&gt;width, depth, and input resolution&lt;/strong&gt; —&lt;br&gt;
called &lt;strong&gt;Compound Scaling&lt;/strong&gt; — yields more efficient performance improvements.&lt;/p&gt;
&lt;hr&gt;
&lt;div class="text-center"&gt;
&lt;a
id="button-b8fff8de9736d3d13548a241312882d4"
href="https://ansangah.github.io/uploads/deeplearning/2-%ec%88%9c%eb%b0%a9%ed%96%a5%ec%8b%a0%ea%b2%bd%eb%a7%9d.pdf"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-6 py-3 text-lg rounded-lg"
role="button"
aria-label="Download PDF"
&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;span&gt;Download PDF&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;</description></item><item><title>📁 Chapter 3: Neural Network Learning and Optimization</title><link>https://ansangah.github.io/en/blog/ai-blog/3networktraining/</link><pubDate>Wed, 22 Oct 2025 00:00:00 +0000</pubDate><guid>https://ansangah.github.io/en/blog/ai-blog/3networktraining/</guid><description>
&lt;details class="print:hidden xl:hidden" open&gt;
&lt;summary&gt;Table of Contents&lt;/summary&gt;
&lt;div class="text-sm"&gt;
&lt;nav id="TableOfContents"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#1-overview-of-neural-network-learning"&gt;1. Overview of Neural Network Learning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-model-parameters-vs-hyperparameters"&gt;2. Model Parameters vs. Hyperparameters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-setting-up-the-optimization-problem"&gt;3. Setting Up the Optimization Problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-loss-functions-for-regression-and-classification"&gt;4. Loss Functions for Regression and Classification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-core-idea-of-gradient-descent"&gt;5. Core Idea of Gradient Descent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-families-of-optimization-algorithms"&gt;6. Families of Optimization Algorithms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-routine-of-gradient-descent"&gt;7. Routine of Gradient Descent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#8-summary-at-a-glance"&gt;8. Summary at a Glance&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
&lt;/div&gt;
&lt;/details&gt;
&lt;h2 id="1-overview-of-neural-network-learning"&gt;1. Overview of Neural Network Learning&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A neural network initially has no idea what output to produce for a given input.&lt;/li&gt;
&lt;li&gt;By repeatedly feeding training data, it gradually learns the mapping rule between input and output.&lt;/li&gt;
&lt;li&gt;“Learning” means discovering this mapping rule.&lt;/li&gt;
&lt;li&gt;Each neuron is composed of weighted summation and an activation function.&lt;/li&gt;
&lt;li&gt;Stacking layers forms the overall neural network structure, and these structural choices are fixed before training.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="2-model-parameters-vs-hyperparameters"&gt;2. Model Parameters vs. Hyperparameters&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Model parameters&lt;/strong&gt;: weights and biases.&lt;br&gt;
These change continuously during training depending on data and are saved as the trained model.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hyperparameters&lt;/strong&gt;: learning rate, optimizer, batch size, network depth, dropout rate, etc.&lt;br&gt;
These are set manually and do not change automatically through training.&lt;/li&gt;
&lt;li&gt;If an activation function (e.g., PReLU) contains a learnable coefficient, that coefficient counts as a model parameter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, in a house price prediction model, the mapping&lt;br&gt;
&lt;code&gt;(number of rooms, area, house type, distance to station → price)&lt;/code&gt;&lt;br&gt;
is captured by the model parameters. Once training is complete, the model can perform inference based on those learned rules.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="3-setting-up-the-optimization-problem"&gt;3. Setting Up the Optimization Problem&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Learning is redefined as minimizing or maximizing an objective function.&lt;/li&gt;
&lt;li&gt;Standard formulation:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;$$
\begin{aligned}
&amp;amp;\text{minimize} &amp;amp;&amp;amp; f(\mathbf{x}) \
&amp;amp;\text{subject to} &amp;amp;&amp;amp; g_i(\mathbf{x}) \le 0,\quad i=1,\dots,m \
&amp;amp;&amp;amp;&amp;amp; h_j(\mathbf{x}) = 0,\quad j=1,\dots,p
\end{aligned}
$$&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;( f(\mathbf{x}) ): objective (loss) function&lt;/li&gt;
&lt;li&gt;( g_i, h_j ): constraint functions&lt;/li&gt;
&lt;li&gt;Getting close to the optimal solution is called &lt;em&gt;convergence&lt;/em&gt;. Once sufficiently close, the model is said to have converged.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="4-loss-functions-for-regression-and-classification"&gt;4. Loss Functions for Regression and Classification&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Regression Problems&lt;/strong&gt;:&lt;br&gt;
Find parameters ( \theta ) that minimize the difference between target ( t ) and prediction ( y = f_\theta(x) ).&lt;br&gt;
Representative loss = Mean Squared Error (MSE).&lt;/p&gt;
&lt;p&gt;$$
\begin{aligned}
&amp;amp;\underset{\theta}{\text{minimize}} &amp;amp;&amp;amp; \frac{1}{N} \sum_{i=1}^{N} (f(\mathbf{x}_i; \theta) - t_i)^2 \
&amp;amp;\text{subject to} \
&amp;amp;&amp;amp;&amp;amp; \text{No constraints}
\end{aligned}
$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Classification Problems&lt;/strong&gt;:&lt;br&gt;
Find parameters ( \theta ) that minimize the difference between the observed distribution ( t ) and predicted distribution ( y ).&lt;br&gt;
Representative loss = Cross-Entropy (CE).&lt;/p&gt;
&lt;p&gt;$$
\begin{aligned}
&amp;amp;\underset{\theta}{\text{minimize}} &amp;amp;&amp;amp; - \frac{1}{N} \sum_{i=1}^{N} \sum_{k=1}^{K} t_{ik} \log \hat{y}_{ik} \
&amp;amp;\text{subject to} \
&amp;amp;&amp;amp;&amp;amp; \text{No constraints}
\end{aligned}
$$&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once the loss function is defined, parameters are updated iteratively in the direction that minimizes the loss.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="5-core-idea-of-gradient-descent"&gt;5. Core Idea of Gradient Descent&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The ideal case is reaching the &lt;em&gt;global minimum&lt;/em&gt;, but real loss surfaces are complex → in practice, we settle for a good &lt;em&gt;local minimum&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Gradient descent updates parameters using the gradient of the loss function ( L(\theta) ):&lt;/p&gt;
&lt;p&gt;$$
\theta^{(t+1)} = \theta^{(t)} - \alpha \nabla_\theta L(\theta^{(t)})
$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;( \alpha ): learning rate (step size)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;( -\nabla_\theta L ): steepest descent direction&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Since neural networks are composite functions, gradients for each parameter are computed via the &lt;strong&gt;chain rule&lt;/strong&gt; (backpropagation).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="6-families-of-optimization-algorithms"&gt;6. Families of Optimization Algorithms&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;First-order methods&lt;/strong&gt;: Gradient Descent, SGD, Momentum, AdaGrad, RMSProp, Adam, etc.&lt;br&gt;
Stable even when the loss surface is non-convex.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quasi-second-order methods&lt;/strong&gt;: Quasi-Newton, Conjugate Gradient, Levenberg–Marquardt.&lt;br&gt;
Approximate curvature information for faster convergence but require more memory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Second-order methods&lt;/strong&gt;: Newton’s method, interior-point methods.&lt;br&gt;
Directly use curvature, fast but computationally heavy and suited to convex problems — impractical for large neural networks.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="7-routine-of-gradient-descent"&gt;7. Routine of Gradient Descent&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Perform &lt;strong&gt;forward propagation&lt;/strong&gt; to compute predictions.&lt;/li&gt;
&lt;li&gt;Evaluate the &lt;strong&gt;loss function&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Compute partial derivatives (gradients) of the loss w.r.t. each parameter (&lt;strong&gt;backpropagation&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Update weights and biases using the update rule.&lt;/li&gt;
&lt;li&gt;Stop training once the loss change is below a certain threshold (convergence).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When parameters are fixed after convergence, the model encodes the mapping function that determines outputs for any given input.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="8-summary-at-a-glance"&gt;8. Summary at a Glance&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Neural network learning = discovering functional rules from data.&lt;/li&gt;
&lt;li&gt;Regression usually uses MSE; classification uses Cross-Entropy.&lt;/li&gt;
&lt;li&gt;Optimization = reformulating learning as a loss minimization problem and solving it numerically.&lt;/li&gt;
&lt;li&gt;Gradient descent is the fundamental yet powerful first-order optimization method.&lt;/li&gt;
&lt;li&gt;Backpropagation is essential for applying gradient descent to neural networks.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;div class="text-center"&gt;
&lt;a
id="button-796ae02c7e5f487593cdbbe4c189dc87"
href="https://ansangah.github.io/uploads/deeplearning/3-%ec%8b%a0%ea%b2%bd%eb%a7%9d%ed%95%99%ec%8a%b5.pdf"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-6 py-3 text-lg rounded-lg"
role="button"
aria-label="Download PDF"
&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;span&gt;Download PDF&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;</description></item></channel></rss>