<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The making of a MLP on Max's blog</title><link>http://max-amb.com/series/the-making-of-a-mlp/</link><description>Recent content in The making of a MLP on Max's blog</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 17 Aug 2025 00:00:00 +0100</lastBuildDate><atom:link href="http://max-amb.com/series/the-making-of-a-mlp/index.xml" rel="self" type="application/rss+xml"/><item><title>The main components of the MLP</title><link>http://max-amb.com/blog/the_main_components_of_the_mlp/</link><pubDate>Sun, 17 Aug 2025 00:00:00 +0100</pubDate><guid>http://max-amb.com/blog/the_main_components_of_the_mlp/</guid><description>&lt;details>
 &lt;summary>Contents&lt;/summary>
 
&lt;nav id="TableOfContents">
 &lt;ul>
 &lt;li>&lt;a href="#the-structure-of-the-network">The structure of the network&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#the-new-function">The new function&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#arguments">Arguments&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#network-setup">Network setup&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#weight-initialisation">Weight initialisation&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#initialisation-options">Initialisation options&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#bias-initialisation">Bias initialisation&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#returning">Returning&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#the-forward-pass-function">The forward pass function&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#arguments-1">Arguments&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#return-value">Return value&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#initialisation">Initialisation&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#all-layers-but-one">All layers but one&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#the-one-layer">The one layer&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#conclusion">Conclusion&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#appendix">Appendix&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#the-rng-tangent">The RNG tangent&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;/ul>
&lt;/nav>


&lt;/details>

&lt;p>This is the second iteration in the &lt;a href="http://max-amb.com/series/the-making-of-a-mlp/">series&lt;/a> where we are building a Multi-Layer-Perceptron (MLP) from scratch!
This post will consider the main sections of the code in the MLP, which are the:&lt;/p></description></item><item><title>The maths behind the MLP</title><link>http://max-amb.com/blog/the_maths_behind_the_mlp/</link><pubDate>Wed, 13 Aug 2025 00:00:00 +0000</pubDate><guid>http://max-amb.com/blog/the_maths_behind_the_mlp/</guid><description>&lt;details>
 &lt;summary>Contents&lt;/summary>
 
&lt;nav id="TableOfContents">
 &lt;ul>
 &lt;li>&lt;a href="#why-from-scratch">Why from scratch&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#intuition">Intuition?&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#notation">Notation&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#forward-pass">Forward pass&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#matrix-notation">Matrix notation&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#vector-of-z-values">Vector of z values&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#vector-of-neuron-values">Vector of neuron values&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#non-linearity">Non-linearity&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#conclusion">Conclusion&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#backpropagation">Backpropagation&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#output-layer-derivatives">Output layer derivatives&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#bias-derivative">Bias derivative&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#weight-derivative">Weight derivative&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#delta">Delta&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#representation-of-output-layer-backpropagation-as-a-matrix-operation">Representation of output layer backpropagation as a matrix operation&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#added-notation">Added notation&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#conclusion-of-the-output-layer-derivatives">Conclusion of the output layer derivatives&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#hidden-layer-derivatives">Hidden layer derivatives&lt;/a>
 &lt;ul>
 &lt;li>&lt;a href="#intuition-behind-the-derivative-sum">Intuition behind the derivative sum&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#derivative-of-the-bias">Derivative of the bias&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#derivative-of-the-weight">Derivative of the weight&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#deltas-again">Delta&amp;rsquo;s again&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#representation-of-hidden-layer-backpropagation-as-a-matrix-operation">Representation of hidden layer backpropagation as a matrix operation&lt;/a>&lt;/li>
 &lt;li>&lt;a href="#conclusion-of-the-hidden-layer-derivatives">Conclusion of the hidden layer derivatives&lt;/a>&lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;/ul>
 &lt;/li>
 &lt;li>&lt;a href="#summary">Summary&lt;/a>&lt;/li>
 &lt;/ul>
&lt;/nav>


&lt;/details>

&lt;p>This blog(/tutorial maybe?) is the first part in a walk-through of the process I followed to build a multi-layer-perceptron (MLP) from scratch in rust. Followed by using it to classify the &lt;a href="https://en.wikipedia.org/wiki/MNIST_database">MNIST dataset&lt;/a>. The source code for the MLP can be found &lt;a href="https://github.com/max-amb/number_recognition">here&lt;/a>.&lt;/p></description></item></channel></rss>