<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>pytorch-from-first-principles examples on Programmer.ie: Modern AI programming</title>
		<link>http://programmer.ie/examples/pytorch-from-first-principles/</link>
		<description>Recent content in pytorch-from-first-principles examples on Programmer.ie: Modern AI programming</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<atom:link href="http://programmer.ie/examples/pytorch-from-first-principles/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>The loss fell to 11.25 and the model learned nothing</title>
				<link>http://programmer.ie/examples/pytorch-from-first-principles/02-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/pytorch-from-first-principles/02-chapter/</guid>
				<description>&lt;p&gt;Broadcasting is a feature that is willing to make sense of shape combinations&#xA;you did not intend to write. In the chapter&amp;rsquo;s opening program the targets&#xA;arrive as a column, the predictions as a row, and the subtraction silently&#xA;produces a four by four grid of errors: every prediction compared against&#xA;every target. Nothing raises, the loss falls by two thirds, and the model ends&#xA;up answering &lt;code&gt;y = 7.5&lt;/code&gt; whatever the input.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The loss went to zero and half the model never moved</title>
				<link>http://programmer.ie/examples/pytorch-from-first-principles/03-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/pytorch-from-first-principles/03-chapter/</guid>
				<description>&lt;p&gt;While the tensors of a forward pass flow, PyTorch writes down a record of which&#xA;operation produced which result, with the references needed to differentiate&#xA;the computation. A missing gradient is a fact about that record.&lt;/p&gt;&#xA;&lt;p&gt;The chapter&amp;rsquo;s opening loop detaches a feature before returning it, so the log&#xA;can hold values without holding the graph. The loss still falls to zero,&#xA;because the second parameter absorbs the whole job. This program composes the&#xA;chapter&amp;rsquo;s pieces into one run: the broken loop, the record, a reachability&#xA;check and the repair.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The error names the classifier; the trace names the convolution</title>
				<link>http://programmer.ie/examples/pytorch-from-first-principles/08-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/pytorch-from-first-principles/08-chapter/</guid>
				<description>&lt;p&gt;A convolution changes two independent things: the channel count, which you&#xA;declare, and the spatial extent, which you derive from the kernel, stride,&#xA;padding and dilation. Get either wrong and the error arrives downstream,&#xA;naming a layer that did nothing wrong.&lt;/p&gt;&#xA;&lt;p&gt;This program composes the chapter&amp;rsquo;s pieces into one run: the derived rule&#xA;checked against PyTorch over thousands of combinations, then a small network&#xA;traced against a hand-written shape list, once as written and once with one&#xA;padding removed.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Two tensors, the same shape, and not the same tensor</title>
				<link>http://programmer.ie/examples/pytorch-from-first-principles/10-chapter/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>http://programmer.ie/examples/pytorch-from-first-principles/10-chapter/</guid>
				<description>&lt;p&gt;Attention is a sequence of explicit relationships between represented&#xA;vectors, and almost every stage can be wrong while producing exactly the&#xA;shape you predicted. Splitting the embedding across heads is the smallest&#xA;example: a reshape gives the shape you wanted and not the arrangement of&#xA;values you meant.&lt;/p&gt;&#xA;&lt;p&gt;This program composes the chapter&amp;rsquo;s pieces into one run: the good and bad&#xA;head split, a round trip that catches the bad one, a hand-written attention&#xA;compared against PyTorch&amp;rsquo;s, and a future-token intervention.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
