<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>X on Sanketh's Blog</title><link>https://sankethbk.github.io/blog/tags/x/</link><description>Recent content in X on Sanketh's Blog</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Mon, 14 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://sankethbk.github.io/blog/tags/x/index.xml" rel="self" type="application/rss+xml"/><item><title>Training a 2-Layer Network in NumPy: From Scalar to Vectorized Backprop</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-14-1-training-a-2-layer-network-in-numpy/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-14-1-training-a-2-layer-network-in-numpy/</guid><description>&lt;h1 id="training-a-2-layer-network-in-numpy-from-scalar-to-vectorized-backprop"&gt;Training a 2-Layer Network in NumPy: From Scalar to Vectorized Backprop&lt;/h1&gt;
&lt;p&gt;The &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-12-3-backpropagation-in-a-fully-connected-network"&gt;previous note&lt;/a&gt; did the backward pass for a small 2-layer network by hand, one scalar at a time. That is the best way to understand what backprop actually does.&lt;/p&gt;
&lt;p&gt;This note takes the next step: turn that scalar walk into compact, vectorized NumPy code. The math is unchanged; the only thing that changes is notation. I will introduce every matrix slowly — what its rows and columns mean, where the division by the batch size comes from, and why it is exactly the same algorithm you already did by hand.&lt;/p&gt;</description></item></channel></rss>