<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[AI Learning Journey - Medium]]></title>
        <description><![CDATA[A collection of articles to highlight my AI learning - Medium]]></description>
        <link>https://medium.com/ai-learning-journey?source=rss----537db73369ac---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>AI Learning Journey - Medium</title>
            <link>https://medium.com/ai-learning-journey?source=rss----537db73369ac---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 04:53:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ai-learning-journey" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Convolution Neural Networks]]></title>
            <link>https://medium.com/ai-learning-journey/convolution-neural-networks-98db6e1eea32?source=rss----537db73369ac---4</link>
            <guid isPermaLink="false">https://medium.com/p/98db6e1eea32</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[convolutional-network]]></category>
            <dc:creator><![CDATA[Eric Flynn]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 13:37:51 GMT</pubDate>
            <atom:updated>2025-01-04T14:11:38.319Z</atom:updated>
            <content:encoded><![CDATA[<h4>Simplifying AI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_JS_asJ94F4V9PWd" /></figure><p>A Convolutional Neural Network (CNN) is a specialized deep learning architecture designed to process spatial data. Just like the visual cortex processes visual stimuli hierarchically — starting with simple features like edges and progressing to complex shapes — CNNs emulate this layered approach in their design.</p><p>This article provides a beginner-friendly introduction to CNNs, tracing their evolution from recognizing handwritten digits in the 1990s to powering today’s cutting-edge applications, like self-driving cars. Along the way we’ll explore the key design principles that set them apart from other types of artificial neural networks, and the mechanisms that endow them with the gift of sight.</p><h3>LeNet-5: The First Convolution Neural Network</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*47dGW9_F9N-sSOWd.png" /></figure><p>The first CNN, LeNet-5, was developed in 1998 by Yann LeCun. This groundbreaking architecture was specifically designed to process images of handwritten digits and classify them with remarkable accuracy. While this task might seem trivial today — often covered in the early chapters of AI and machine learning courses — at the time, no existing technology could solve it effectively.</p><p>By successfully addressing what became known as the <strong>MNIST problem</strong>, LeCun not only pioneered a new era in computer vision but also demonstrated the practical viability of artificial intelligence. His work proved that AI could move beyond theoretical constructs to solve tangible, real-world problems. <em>LeNet-5 was later commercialized into banking systems, where it was used to automate check reading.</em></p><h4>Images and Pixels</h4><p>The concept of sight when it comes to computers is vastly different from the human experience. While our brains are natively trained to recognize patterns and interpret the world intuitively, a computer can only read numbers.</p><p>Take the MNIST digit images, for example. Each image is represented as a 28x28 pixel matrix, where each pixel holds a value between 0 (white) and 255 (black), encoding the intensity of light at that point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*Gm2FOeuMaCKn4L95.jpeg" /></figure><h4>Color Images</h4><p>The structure becomes more complex when we move from grayscale to color images. Unlike the single-layer 28x28 matrix of grayscale images, color images introduce an additional dimension, forming a 3D array. This extra dimension is often referred to as the <strong>color channel</strong> or <strong>depth</strong>, and it represents three distinct layers corresponding to the primary colors: Red (R), Green (G), and Blue (B). Each layer contains intensity values for its respective color, and the combination of these layers at each pixel determines its overall color.</p><p>For example, a 28x28 grayscale image becomes a 28x28x3 array in a color format, where each pixel now carries three values — one for each color channel — enabling the computer to capture and process the rich details of color in visual data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xE8Bh6vS3mvyYTGI.png" /></figure><p>Now that the foundation has been laid, lets dive into the key structural components of a Convolution Neural Network!</p><h3>Input Data Preprocessing</h3><p>Proper cleaning of the input data is especially important in CNNs since they use gradient-based optimization, which is sensitive to the scale and distribution of input data.</p><ol><li>Resizing — CNN models expect the input matrices to be of the same shape</li><li>Normalization — Scale input pixel values so they are normally distributed around the mean of your dataset</li><li>Augmentation — Applies random transformations to input data to create more training examples and introduce randomness <em>(zoom, flip, rotate)</em></li></ol><h3>Convolution Layer</h3><p>The convolution layer is the first layer of a CNN and is where it distinguishes itself from other models. This layer is responsible for extracting key features from input data, like edges, textures, or patterns in an image.</p><h4>Filters (Kernels)</h4><p>Filters are the fundamental component of the convolutional layer. These small, trainable matrices (e.g., 3x3 or 5x5) slide across input data, performing dot product operations with overlapping image regions to produce a <strong>feature map</strong> — a matrix that highlights patterns detected by the filter. Initially, these filters start with random values but are adjusted during training to detect meaningful features, such as edges, textures, or complex patterns.</p><p>The <strong>stride</strong> determines how far the filter moves with each step, affecting output size and detail, while <strong>padding</strong> ensures edge features are included by maintaining spatial dimensions. Early layers of a CNN use filters to capture basic features like edges or gradients, while deeper layers combine these into more abstract patterns, such as shapes or objects. By stacking multiple filters, CNNs build a hierarchical understanding of the input data, extracting increasingly complex features as the network deepens.</p><h4>Feature Maps</h4><p>The output after applying a filter to an image is called a <strong>feature map,</strong> with<strong> </strong>each filter having its own.<strong> </strong>It highlights where specific patterns appear in the image, with brighter values indicating stronger detections.</p><p><em>The feature maps below show the output of the first 4 layers from the pre-trained VGG16 model applied to the image of the orange cat from above. Filters will not be able to extract any meaning from images untill they have been trained.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lT-PfxvH4KXkmGyscklemA.png" /></figure><h3>Activation Layer</h3><p>The activation layer applies a <strong>non-linear function</strong> every feature on every feature map, enabling the CNN to learn complex non-linear patterns.</p><h4><strong>ReLU (Rectified Linear Unit)</strong>:</h4><p>ReLU is the most commonly used activation function in CNNs. It replaces negative values with 0 while leaving positive values unchanged. This not only reduces training computation needed by getting rid of negative values, but also helps to make meaningful features stand out even more.</p><h3>Pooling Layer</h3><p>After the activation function is applied element-wise to the feature maps, the resulting activated feature maps are passed to the <strong>pooling layer</strong>. The pooling layer reduces the spatial dimensions of these feature maps while retaining the most important information. This step not only makes the network more computationally efficient since there are less things to calculate, but also helps it focus on the most dominant features.</p><ul><li><strong>Max Pooling</strong>: Pick the largest value in the block.</li><li><strong>Average Pooling</strong>: Take the average of the values.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yVvOWkOiCc1AA2ol" /></figure><p>Pooling begins the process of <strong>reducing dimensionality</strong>, gradually condensing the spatial information. By the time the network reaches the final layers, this reduced representation allows the CNN to focus on the most critical features for classification.</p><h3>Fully Connected Layer</h3><h4>Flattening</h4><p>Before data reaches the fully connected layer, the pooled feature maps are flattened into a 1D vector <em>(a list)</em>. Flattening bridges the gap between the spatial feature extraction process and the classification stage since dense layers require flat input.</p><h4>Dense Layers</h4><p>Next, each of the flattened values in the vector now become inputs into another neural network, which contains additional trainable parameters (weights).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z0dfFMTFmQSg0Dvx" /></figure><ul><li><strong>Inputs (x1, x2, x3, x4)</strong>: Represent the flattened feature vector from the previous layer.</li><li><strong>Weights (w11, w21, etc.)</strong>: Connect each input to every neuron in the dense layer, showing how each input contributes differently to each neuron.</li><li><strong>Biases (b1, b2, b3)</strong>: Add a constant adjustment to each neuron’s calculation.</li><li><strong>Activation Function (ReLU)</strong>: Applied after combining the inputs, weights, and bias, deciding the neuron’s final output.</li></ul><h4>Output Layer</h4><p>In practice, many fully connected layers will be stacked sequentially, with the last one having the same number of neurons as the number of classes in the classification task. This last layer is called the <strong>output layer.</strong></p><h4><strong>Classification</strong></h4><ul><li>The output layer has one neuron per class (e.g., cat, dog, rabbit).</li><li>A <strong>Softmax activation function</strong> is applied to convert raw scores into probabilities, ensuring they sum to 1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EiCBeNxzIZEnPTm2" /></figure><h4><strong>Binary</strong></h4><ul><li>A single output neuron with a <strong>Sigmoid activation function</strong> outputs a probability (e.g., “is this a cat?”)</li></ul><h4>Regression</h4><p>A <strong>linear activation function</strong> outputs the input directly without applying any transformation, making it suitable for regression tasks where predictions can take any real value. Unlike bounded functions (e.g., sigmoid or softmax), it allows the model to predict continuous values with unlimited range, enabling precise outputs like 72.56 or -3.14. This makes it ideal for tasks like predicting prices, coordinates, or measurements.</p><h3>Training with Backpropagation</h3><p>While we’ve covered the architecture of a CNN — its layers, components, and the flow of data — one critical piece of the puzzle remains: how does a CNN learn? Backpropagation is the most commonly used training algorithm in deep learning, and is the key to how a CNN learns.</p><h4>Forward Pass</h4><p>The data flows through the network as explained above:</p><ul><li><strong>Convolutional Layers</strong> extract features.</li><li><strong>Activation Layers</strong> introduce non-linearity to capture complex patterns.</li><li><strong>Pooling Layers</strong> simplify the data and reduce its dimensionality.</li><li><strong>Fully Connected Layers</strong> use these condensed features to make predictions.</li></ul><p>At the output layer, predictions (e.g., class probabilities) are compared to the true labels using a <strong>loss function</strong>.</p><h4>Loss Function</h4><p>The loss function measures how well the model’s predictions match the actual labels. Common loss functions include:</p><ul><li><strong>Cross-Entropy Loss</strong>: For classification tasks, it penalizes incorrect predictions by comparing predicted probabilities to the true class.</li><li><strong>Mean Squared Error</strong>: For regression tasks, it measures the average squared difference between predictions and actual values.</li></ul><h4>Backward Pass</h4><p>The network then works backward, layer by layer, calculating how much each weight and bias contributed to the loss:</p><ul><li><strong>Gradients</strong>: These are the derivatives of the loss with respect to the parameters. They tell the network the direction and magnitude of the adjustments needed to improve.</li><li><strong>Gradient Descent</strong>: Using these gradients, the parameters are updated to minimize the loss. Variants like <strong>Stochastic Gradient Descent (SGD)</strong> or <strong>Adam Optimizer</strong> are commonly used.</li></ul><h3>Training Step</h3><p>In each training step, the CNN updates its parameters (weights and biases) using gradients and a <strong>learning rate</strong> (η, which controls the size of these updates.</p><ul><li><strong>Forward Pass</strong>: Input → Output → Loss</li><li><strong>Backward Pass</strong>: Loss → Gradients → Weight Updates</li></ul><p>A smaller η ensures stable but slow progress, while a larger η accelerates training but risks overshooting the optimal values. This process is repeated over <strong>epochs</strong>, with each epoch nudging the parameters closer to optimal values as the loss gradually decreases. Proper tuning of η ensures efficient convergence.</p><h3>Conclusion</h3><p>Convolutional Neural Networks have revolutionized how machines process and understand visual data, drawing inspiration from the human brain’s visual cortex. From their early success with LeNet-5 in digit recognition to their modern applications in autonomous vehicles and medical imaging, CNNs have become a cornerstone of AI advancements.</p><p>By combining layers for feature extraction, dimensionality reduction, and classification, CNNs have been fine-tuned to capture the hierarchical structure of visual information. Their training, powered by backpropagation and gradient-based optimization, enables them to learn complex patterns with remarkable accuracy.</p><p>As we continue to innovate, CNNs remain a testament to how mimicking nature’s design principles can unlock groundbreaking possibilities in artificial intelligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98db6e1eea32" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ai-learning-journey/convolution-neural-networks-98db6e1eea32">Convolution Neural Networks</a> was originally published in <a href="https://medium.com/ai-learning-journey">AI Learning Journey</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Master AI With Me in 2025]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/ai-learning-journey/master-ai-with-me-in-2025-887a1999fdb0?source=rss----537db73369ac---4"><img src="https://cdn-images-1.medium.com/max/1980/0*ZRo3mSf_7dsiiSCd" width="1980"></a></p><p class="medium-feed-snippet">Simplify AI</p><p class="medium-feed-link"><a href="https://medium.com/ai-learning-journey/master-ai-with-me-in-2025-887a1999fdb0?source=rss----537db73369ac---4">Continue reading on AI Learning Journey »</a></p></div>]]></description>
            <link>https://medium.com/ai-learning-journey/master-ai-with-me-in-2025-887a1999fdb0?source=rss----537db73369ac---4</link>
            <guid isPermaLink="false">https://medium.com/p/887a1999fdb0</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[2025]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Eric Flynn]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 13:37:37 GMT</pubDate>
            <atom:updated>2025-01-19T21:29:54.332Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Building Neural Networks in PyTorch From Scratch]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/ai-learning-journey/building-neural-networks-in-pytorch-from-scratch-c957316b7974?source=rss----537db73369ac---4"><img src="https://cdn-images-1.medium.com/max/1455/1*_fMbNr8H3PbI5PPx8U8UnA.png" width="1455"></a></p><p class="medium-feed-snippet">My 2025 AI Learning Journey</p><p class="medium-feed-link"><a href="https://medium.com/ai-learning-journey/building-neural-networks-in-pytorch-from-scratch-c957316b7974?source=rss----537db73369ac---4">Continue reading on AI Learning Journey »</a></p></div>]]></description>
            <link>https://medium.com/ai-learning-journey/building-neural-networks-in-pytorch-from-scratch-c957316b7974?source=rss----537db73369ac---4</link>
            <guid isPermaLink="false">https://medium.com/p/c957316b7974</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[pytorch]]></category>
            <dc:creator><![CDATA[Eric Flynn]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 13:37:27 GMT</pubDate>
            <atom:updated>2025-01-21T13:32:39.640Z</atom:updated>
        </item>
    </channel>
</rss>