<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Neural Networks - Category - Jorgen Bergstrom</title><link>https://bergstrom.org/categories/neural-networks/</link><description>Neural Networks - Category - Jorgen Bergstrom</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Jorgen Bergstrom</copyright><lastBuildDate>Sat, 16 Nov 2024 00:00:00 -0500</lastBuildDate><atom:link href="https://bergstrom.org/categories/neural-networks/" rel="self" type="application/rss+xml"/><item><title>Backpropagation Part 3: 1 Hidden Layer, N Perceptrons</title><link>https://bergstrom.org/posts/backpropagation_part_3/</link><pubDate>Sat, 16 Nov 2024 00:00:00 -0500</pubDate><author>Jorgen Bergstrom</author><guid>https://bergstrom.org/posts/backpropagation_part_3/</guid><description>[1 Input] + [1 Hidden Layer with N Perceptrons] + [1 Output] In this example I will extend my previous code to be able to handle a hidden layer with N perceptrons. As before, I will demonstrate the use of the neural network by fitting it to the following mathematical function: $y = 0.1 + 0.1 \cdot x^2$ over the range $x \in [0, 10]$. The C++ implementation for this example can be found in my github account.</description></item><item><title>Backpropagation Part 2: 1 Hidden Layer, 2 Perceptrons</title><link>https://bergstrom.org/posts/backpropagation_part_2/</link><pubDate>Tue, 22 Oct 2024 00:00:00 -0500</pubDate><author>Jorgen Bergstrom</author><guid>https://bergstrom.org/posts/backpropagation_part_2/</guid><description><![CDATA[[1 Input] + [1 Hidden Layer with 2 Perceptrons] + [1 Output] In this example I will create a simple neural network that has one input, one hidden layer with 2 perceptrons, and one output. I will then fit that neural network to the following mathematical function: $y = 0.1 + 0.1 \cdot x^2$ over the range $x \in [0,10]$.
C++ code to solve this problem is listed below:
// 2 Layers: 1 input, 2 hidden, 1 output #include &lt;iostream&gt; #include &lt;fstream&gt; #include &lt;algorithm&gt; #include &lt;cassert&gt; #include &lt;vector&gt; #include &lt;cmath&gt; #include &lt;random&gt; double activation(double x, int type) { if (type==1) return std::max(0.]]></description></item><item><title>Backpropagation Part 1: Single Perceptron</title><link>https://bergstrom.org/posts/backpropagation_part_1/</link><pubDate>Sun, 20 Oct 2024 00:00:00 -0500</pubDate><author>Jorgen Bergstrom</author><guid>https://bergstrom.org/posts/backpropagation_part_1/</guid><description>One Network Layer with 1 Input and 1 Output The simplest neural network architecture consists of a single perceptron. This network has only one input and one output, making it a highly streamlined model. While suitable for theoretical understanding, it is insufficient for real-world applications due to its limited capacity. However, it serves as a fundamental building block for studying the principles of backpropagation and training neural networks.
Code Location You can find the source code for this example here.</description></item></channel></rss>