<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Broadcasting on AIBussin — AI applications, systems and books</title><link>https://aibussin.com/tags/broadcasting/</link><description>Recent content in Broadcasting on AIBussin — AI applications, systems and books</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 08 Aug 2026 12:45:00 +0100</lastBuildDate><atom:link href="https://aibussin.com/tags/broadcasting/index.xml" rel="self" type="application/rss+xml"/><item><title>The Tensor: What Is Actually Flowing Through the Loop?</title><link>https://aibussin.com/books/pytorch-from-first-principles/02-chapter/</link><pubDate>Sat, 08 Aug 2026 12:45:00 +0100</pubDate><guid>https://aibussin.com/books/pytorch-from-first-principles/02-chapter/</guid><description>&lt;p&gt;The last program in Chapter 1 trained a two-parameter model on four examples. It worked, and we read it as a story about gradients: predict, measure, differentiate, step. But something in it went unexamined. &lt;code&gt;w&lt;/code&gt; was a single number and &lt;code&gt;x&lt;/code&gt; held four, and &lt;code&gt;w * x + b&lt;/code&gt; produced four predictions without anyone specifying how a scalar and a four-element vector should combine. PyTorch had a rule. We never stated it.&lt;/p&gt;</description></item><item><title>PyTorch Tensor Shapes: Broadcasting, Reshape, View, Permute and the Errors That Waste Your Time</title><link>https://aibussin.com/post/pytorch-zero-to-hero-01/</link><pubDate>Sat, 08 Aug 2026 12:45:00 +0100</pubDate><guid>https://aibussin.com/post/pytorch-zero-to-hero-01/</guid><description>&lt;h2 id="pytorch-zero-to-hero--step-01"&gt;PyTorch: Zero to Hero — Step 01&lt;/h2&gt;&#10;&lt;p&gt;Most PyTorch bugs are not really &amp;ldquo;AI bugs&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;They are shape bugs.&lt;/p&gt;&#10;&lt;p&gt;You expected:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[batch, features]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;but actually had:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[batch, sequence, features]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You expected two tensors to line up.&lt;/p&gt;&#10;&lt;p&gt;They broadcast instead.&lt;/p&gt;&#10;&lt;p&gt;You called &lt;code&gt;view()&lt;/code&gt; after &lt;code&gt;permute()&lt;/code&gt; and got a contiguity error.&lt;/p&gt;&#10;&lt;p&gt;You removed a dimension with &lt;code&gt;squeeze()&lt;/code&gt; and accidentally removed the batch dimension too.&lt;/p&gt;&#10;&lt;p&gt;Or you reached the familiar message:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RuntimeError: The size of tensor a (...) must match the size of tensor b (...)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This article is about becoming dangerous enough with tensors that these errors stop being mysterious.&lt;/p&gt;</description></item></channel></rss>