<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Latent Space — Notes on machine intelligence</title><link>https://mlblogg.com/</link><description>Recent content on Latent Space — Notes on machine intelligence</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 06 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://mlblogg.com/index.xml" rel="self" type="application/rss+xml"/><item><title>From pixels to masks: build a baseline you can question.</title><link>https://mlblogg.com/courses/vision-starter/02-pixels-to-masks/</link><pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/vision-starter/02-pixels-to-masks/</guid><description>&lt;p&gt;Imagine inspecting a bright rectangular part against a dark background. Before training a segmentation network, we can ask a simpler question: does a brightness rule already locate the part? A baseline gives us something concrete to test, a way to discover data problems, and a reference a more expensive model should improve upon.&lt;/p&gt;
&lt;p&gt;The rule will fail in two different ways. A bright speck outside the rectangle will be selected, and a dark pixel inside it will be missed. We will repair this particular example, then construct another where the same repair destroys a real object. That second result is as important as the first.&lt;/p&gt;</description></item><item><title>Images are arrays. The contract matters.</title><link>https://mlblogg.com/courses/vision-starter/01-images-are-arrays/</link><pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/vision-starter/01-images-are-arrays/</guid><description>&lt;p&gt;You load a photograph, run a model, and get a poor prediction. Is the model weak, or did your loader supply blue where the model expected red? Both produce a tensor of the expected shape. A successful function call does not prove that the data means what you think it means.&lt;/p&gt;
&lt;p&gt;Our first goal is modest and useful: describe an image precisely enough that another function can interpret it correctly. We will use four pixels, follow one through conversion, and build a small batch. These are the same boundaries that exist in a large inference service.&lt;/p&gt;</description></item><item><title>IoU, Dice, and Hausdorff: what each metric misses.</title><link>https://mlblogg.com/posts/segmentation-metrics/</link><pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/segmentation-metrics/</guid><description>&lt;p&gt;A segmentation model scores 0.9863 Dice. Almost perfect? In the example below, it also predicts a stray foreground pixel more than four pixels from the target. Another prediction has a lower Dice of 0.8333, but its boundary is never more than one pixel away. Which would you prefer?&lt;/p&gt;
&lt;p&gt;You cannot answer without knowing what the segmentation is for. Measuring area, separating objects, locating a precise boundary, and avoiding any distant false detection are different goals. A metric gives a particular summary of an error; it does not decide which errors matter.&lt;/p&gt;</description></item><item><title>RGB, BGR, and alpha: what a channel actually means.</title><link>https://mlblogg.com/courses/vision-starter/03-channels-and-alpha/</link><pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/vision-starter/03-channels-and-alpha/</guid><description>&lt;p&gt;A transparent logo looks correct in your browser, but develops black edges when you resize it for a model. A red object turns blue after loading. A preprocessing function returns three averages, yet you expected one value at every pixel. These failures can happen before a neural network sees a single example.&lt;/p&gt;
&lt;p&gt;They share a cause: a shape tells us how many values exist, but not what those values represent. This lesson connects channel meaning to operations you can inspect. We will reuse the four pixels from &lt;a href="https://mlblogg.com/courses/vision-starter/01-images-are-arrays/"&gt;lesson 1&lt;/a&gt;
, then introduce a separate four-pixel transparency experiment. Every diagram is generated from the same source used by the downloadable examples.&lt;/p&gt;</description></item><item><title>Attention, from the ground up.</title><link>https://mlblogg.com/posts/attention-from-scratch/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/attention-from-scratch/</guid><description>&lt;p&gt;We have a vector for every input position. Each vector starts with token and position information, but it cannot yet incorporate the rest of the sequence. Attention gives a position a way to gather information from other positions, with weights that depend on the current input.&lt;/p&gt;
&lt;p&gt;The central operation is a &lt;strong&gt;weighted mixture&lt;/strong&gt;. We will build that mixture without learned projections, calculate the weights by hand, then put the matrix equation and code around it. If you arrived here directly, &lt;a href="https://mlblogg.com/courses/attention/01-tokens-and-vectors/"&gt;the course starts with tokens and vectors&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Encoder, decoder, or both?</title><link>https://mlblogg.com/courses/attention/07-architectures/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/07-architectures/</guid><description>&lt;p&gt;We can assemble the same ingredients in several ways. The words &lt;strong&gt;encoder&lt;/strong&gt; and &lt;strong&gt;decoder&lt;/strong&gt; are easiest to understand as descriptions of information flow and purpose, rather than as mysterious types of neural computation.&lt;/p&gt;
&lt;p&gt;Ask three questions. What information is available when a prediction must be made? Does the output describe an existing input, or does it extend a sequence? If it generates a sequence, is there a separate source representation it should read?&lt;/p&gt;</description></item><item><title>From scores to a distribution.</title><link>https://mlblogg.com/courses/foundations/03-scores-and-probabilities/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/foundations/03-scores-and-probabilities/</guid><description>&lt;p&gt;A dot product can give scores such as &lt;code&gt;[-2, 0, 3]&lt;/code&gt;. Those numbers cannot directly serve as our previous lesson&amp;rsquo;s weighted-average weights: one is negative, and the total is not one. We need a transformation that preserves which scores are larger while producing a distribution over the available choices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Softmax&lt;/strong&gt; does this in two stages. First turn scores into positive evidence. Then divide each evidence value by the total evidence.&lt;/p&gt;</description></item><item><title>Give the sequence a sense of order.</title><link>https://mlblogg.com/courses/attention/02-position/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/02-position/</guid><description>&lt;p&gt;In lesson 1, &lt;code&gt;robot&lt;/code&gt; received a vector by selecting one row of a table. The lookup does not know whether &lt;code&gt;robot&lt;/code&gt; came first or last. Yet “robot follows person” and “person follows robot” describe different relationships.&lt;/p&gt;
&lt;p&gt;We need to expose ordering information to the model. Before choosing a formula, let’s identify the information that is missing.&lt;/p&gt;
&lt;h2 id="1-content-alone-cannot-label-the-positions"&gt;1. Content alone cannot label the positions&lt;/h2&gt;
&lt;p&gt;Imagine an operation that compares every row with every other row, mixes their values, and repeats the same computation at each position. If we rearrange the input rows, the operation can simply rearrange its outputs in the same way. There is no intrinsic “position 3” inside a shared matrix multiplication.&lt;/p&gt;</description></item><item><title>How numbers mix information.</title><link>https://mlblogg.com/courses/foundations/02-weighted-information/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/foundations/02-weighted-information/</guid><description>&lt;p&gt;Suppose three positions offer information. One contains &lt;code&gt;[1, 0]&lt;/code&gt;, another &lt;code&gt;[0, 2]&lt;/code&gt;, and the third &lt;code&gt;[2, 1]&lt;/code&gt;. These are &lt;strong&gt;value vectors&lt;/strong&gt;: each has two features. We want one receiving position to combine their information without losing the distinction between the two features.&lt;/p&gt;
&lt;p&gt;This is the operation at the end of attention. We will start by choosing the weights ourselves. The following lesson will show how scores can become weights, and the attention course will show where those scores come from.&lt;/p&gt;</description></item><item><title>Several heads, one shared representation.</title><link>https://mlblogg.com/courses/attention/05-multi-head/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/05-multi-head/</guid><description>&lt;p&gt;One attention head gives each query one set of weights over the source. A single weighted mixture may have to combine several useful relationships at once. Multi-head attention allows several learned projections to construct different mixtures before those results are combined.&lt;/p&gt;
&lt;p&gt;The key word is &lt;strong&gt;learned&lt;/strong&gt;. We do not assign one head to nouns, one to verbs, and one to position. Different behaviors may emerge, but a head is defined by its projections and computation, not by a guaranteed human-readable role.&lt;/p&gt;</description></item><item><title>The block around attention.</title><link>https://mlblogg.com/courses/attention/06-transformer-block/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/06-transformer-block/</guid><description>&lt;p&gt;An attention layer computes useful mixtures, but a transformer diagram also contains boxes named &lt;strong&gt;Add&lt;/strong&gt;, &lt;strong&gt;Norm&lt;/strong&gt;, and &lt;strong&gt;Feed Forward&lt;/strong&gt;. These operations are not decoration. They determine how information and gradients pass through the stack and how each position transforms its newly gathered context.&lt;/p&gt;
&lt;p&gt;We will build the block used in our final model. Its input and output both have shape &lt;code&gt;(B, T, D)&lt;/code&gt;, which makes it possible to stack blocks without changing the representation width.&lt;/p&gt;</description></item><item><title>Train it. Test what it learned.</title><link>https://mlblogg.com/courses/attention/08-train-a-transformer/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/08-train-a-transformer/</guid><description>&lt;p&gt;We have assembled the pieces. Now the model must learn a task. Given a source such as &lt;code&gt;[4, 7, 9]&lt;/code&gt;, we want it to generate &lt;code&gt;[4, 7, 9, EOS]&lt;/code&gt;. We choose copying because the target is unambiguous, the data can be generated locally, and every stage of an encoder–decoder transformer is still exercised.&lt;/p&gt;
&lt;p&gt;Download and unzip the &lt;a href="https://mlblogg.com/code/attention-course.zip"&gt;complete code bundle&lt;/a&gt;
. It contains the NumPy forward calculations, the PyTorch model, this training script, numerical checks, and a recorded example run. No dataset download or GPU is required.&lt;/p&gt;</description></item><item><title>What actually changes when a model learns?</title><link>https://mlblogg.com/courses/foundations/04-what-learning-changes/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/foundations/04-what-learning-changes/</guid><description>&lt;p&gt;Our first model has one parameter: a weight of 0.5. Given input 2, it multiplies by that weight and predicts 1. The desired target is 3. Learning will change the weight so that this example&amp;rsquo;s prediction moves closer to its target.&lt;/p&gt;
&lt;p&gt;This tiny model has no attention, but the learning distinction is the same. A model computes outputs with its current parameters; a training procedure adjusts those parameters using an objective and data.&lt;/p&gt;</description></item><item><title>What is actually inside a tensor?</title><link>https://mlblogg.com/courses/foundations/01-arrays-and-projections/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/foundations/01-arrays-and-projections/</guid><description>&lt;p&gt;Before a model can attend to anything, it needs a numerical representation. “Tensor” sounds specialized, but our first tensor is just two rows of numbers. The important part is knowing what each axis means.&lt;/p&gt;
&lt;p&gt;Imagine that each row describes an item, with two measured features. Our input is &lt;code&gt;[[1, 2], [3, 4]]&lt;/code&gt;: two items and two features per item. We will transform each feature pair into a new pair. Nothing here requires language, a model, or a GPU.&lt;/p&gt;</description></item><item><title>Who is allowed to see what?</title><link>https://mlblogg.com/courses/attention/04-masks-and-cross-attention/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/04-masks-and-cross-attention/</guid><description>&lt;p&gt;Attention tells us how to mix a set of values. It does not by itself decide which values a query should be permitted to use. That decision depends on the task.&lt;/p&gt;
&lt;p&gt;A model classifying a complete sentence can read both ends of it. A model predicting the next output token cannot consult the answer it is being asked to predict. A model translating a source may read all of that source while seeing only the existing target prefix. We will express each case with two questions: &lt;strong&gt;where do the vectors come from, and which query–key pairs are visible?&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Words become vectors.</title><link>https://mlblogg.com/courses/attention/01-tokens-and-vectors/</link><pubDate>Sat, 05 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/courses/attention/01-tokens-and-vectors/</guid><description>&lt;p&gt;We want to understand a machine that reads a sequence and produces another sequence. Eventually, ours will copy short sequences of symbols. Before it can read anything, we need to decide how symbols become numbers.&lt;/p&gt;
&lt;p&gt;Consider &lt;strong&gt;“the small robot moves.”&lt;/strong&gt; A computer can store that string, but multiplying character encodings does not automatically give useful language features. We will build a representation in stages. Keep the distinction between a &lt;em&gt;symbol’s identity&lt;/em&gt; and its &lt;em&gt;learned representation&lt;/em&gt; in mind; much later confusion disappears once these are separate.&lt;/p&gt;</description></item><item><title>DETR: object detection as set prediction.</title><link>https://mlblogg.com/posts/detr/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/detr/</guid><description>&lt;p&gt;A detector must answer two questions: &lt;strong&gt;what is in the image, and where is it?&lt;/strong&gt; DETR makes a clean architectural choice: predict a fixed-size set of candidate objects, then match those candidates to the ground truth during training.&lt;/p&gt;
&lt;p&gt;This note is a conceptual walkthrough, with a small matching example rather than a complete detector.&lt;/p&gt;
&lt;h2 id="from-pixels-to-a-set"&gt;From pixels to a set&lt;/h2&gt;
&lt;p&gt;A CNN backbone produces a feature map. DETR flattens those spatial features into a sequence, adds positional information, and sends them through a transformer encoder. A decoder uses learned object queries to attend to that representation.&lt;/p&gt;</description></item><item><title>D-FINE: a better way to draw the box.</title><link>https://mlblogg.com/posts/dfine/</link><pubDate>Sat, 29 Aug 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/dfine/</guid><description>&lt;p&gt;A bounding box often arrives as four numbers, which makes localization look like four ordinary regression tasks. But a partially occluded or blurry edge can be ambiguous. What if the model represented plausible positions as a distribution before producing a coordinate?&lt;/p&gt;
&lt;h2 id="the-idea-behind-d-fine"&gt;The idea behind D-FINE&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://arxiv.org/abs/2410.13842" target="_blank" rel="noopener noreferrer" aria-description="Opens in a new tab"&gt;D-FINE&lt;span class="external-mark" aria-hidden="true"&gt; ↗&lt;/span&gt;&lt;/a&gt;
 reframes box regression in DETR-based detection through &lt;strong&gt;fine-grained distribution refinement (FDR)&lt;/strong&gt;. Decoder layers iteratively refine localization distributions. Its second component, &lt;strong&gt;global optimal localization self-distillation (GO-LSD)&lt;/strong&gt;, transfers localization knowledge from stronger predictions within the model during training.&lt;/p&gt;</description></item><item><title>Linear attention: change the order.</title><link>https://mlblogg.com/posts/linear-attention/</link><pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/linear-attention/</guid><description>&lt;p&gt;Standard attention constructs pairwise interactions between tokens. As the sequence grows, that matrix grows quadratically. Kernel-based linear attention asks whether we can aggregate the keys and values first, then query the aggregate.&lt;/p&gt;
&lt;p&gt;The answer involves changing the attention kernel. You cannot simply move parentheses through the softmax operation.&lt;/p&gt;
&lt;h2 id="the-associative-trick"&gt;The associative trick&lt;/h2&gt;
&lt;p&gt;Replace softmax attention with a positive feature-map kernel &lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;msup&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;⊤&lt;/mi&gt;&lt;/msup&gt;&lt;mi&gt;ϕ&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;k&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\phi(q)^\top\phi(k)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:1.0991em;vertical-align:-0.25em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;ϕ&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.03588em;"&gt;q&lt;/span&gt;&lt;span class="mclose"&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.8491em;"&gt;&lt;span style="top:-3.063em;margin-right:0.05em;"&gt;&lt;span class="pstrut" style="height:2.7em;"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;⊤&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;ϕ&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.03148em;"&gt;k&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. For one query, the normalized output is:&lt;/p&gt;</description></item><item><title>The KV cache, without the mystery.</title><link>https://mlblogg.com/posts/kv-cache/</link><pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/kv-cache/</guid><description>&lt;p&gt;When a causal language model generates another token, the earlier tokens have not changed. With consistent positional handling and inference settings, their keys and values do not need to be recomputed. A &lt;strong&gt;KV cache&lt;/strong&gt; saves them for the next decoding step.&lt;/p&gt;
&lt;p&gt;This note describes ordinary causal self-attention and a deliberately small cache. Real inference engines also manage memory allocation, batching, and varying sequence lengths.&lt;/p&gt;
&lt;h2 id="prefill-and-decode"&gt;Prefill and decode&lt;/h2&gt;
&lt;p&gt;During &lt;strong&gt;prefill&lt;/strong&gt;, the model processes the prompt and stores each layer’s key and value tensors. During &lt;strong&gt;decode&lt;/strong&gt;, the new token produces a new query, key, and value. Its query attends to the cached prefix plus the new key/value pair.&lt;/p&gt;</description></item><item><title>An image is a sequence of patches.</title><link>https://mlblogg.com/posts/vision-transformer/</link><pubDate>Mon, 17 Aug 2026 00:00:00 +0000</pubDate><guid>https://mlblogg.com/posts/vision-transformer/</guid><description>&lt;p&gt;A transformer operates on token vectors. An image arrives as a grid. The bridge between them can be surprisingly simple: divide the image into non-overlapping patches, flatten each patch, and project it into an embedding space.&lt;/p&gt;
&lt;h2 id="count-the-tokens-first"&gt;Count the tokens first&lt;/h2&gt;
&lt;p&gt;For an image with height H and width W, and square patches of side P, the number of patch tokens is:&lt;/p&gt;
&lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML" display="block"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;N&lt;/mi&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mfrac&gt;&lt;mi&gt;H&lt;/mi&gt;&lt;mi&gt;P&lt;/mi&gt;&lt;/mfrac&gt;&lt;mfrac&gt;&lt;mi&gt;W&lt;/mi&gt;&lt;mi&gt;P&lt;/mi&gt;&lt;/mfrac&gt;&lt;mi mathvariant="normal"&gt;.&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;
N = \frac{H}{P}\frac{W}{P}.
&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;span class="katex-html" aria-hidden="true"&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:0.6833em;"&gt;&lt;/span&gt;&lt;span class="mord mathnormal" style="margin-right:0.10903em;"&gt;N&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace" style="margin-right:0.2778em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut" style="height:2.0463em;vertical-align:-0.686em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:1.3603em;"&gt;&lt;span style="top:-2.314em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.13889em;"&gt;P&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="top:-3.23em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="frac-line" style="border-bottom-width:0.04em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="top:-3.677em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.08125em;"&gt;H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.686em;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mopen nulldelimiter"&gt;&lt;/span&gt;&lt;span class="mfrac"&gt;&lt;span class="vlist-t vlist-t2"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:1.3603em;"&gt;&lt;span style="top:-2.314em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.13889em;"&gt;P&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="top:-3.23em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="frac-line" style="border-bottom-width:0.04em;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="top:-3.677em;"&gt;&lt;span class="pstrut" style="height:3em;"&gt;&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal" style="margin-right:0.13889em;"&gt;W&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-s"&gt;​&lt;/span&gt;&lt;/span&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist" style="height:0.686em;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose nulldelimiter"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mord"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;section class="equation-guide" aria-label="Read the equation"&gt;&lt;div class="eyebrow"&gt;READ THE EQUATION&lt;/div&gt;&lt;p class="equation-reading"&gt;Count patch rows and patch columns, then multiply them to get the number of image tokens.&lt;/p&gt;</description></item><item><title>A little less black box.</title><link>https://mlblogg.com/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/about/</guid><description>&lt;p&gt;Latent Space is a place to slow down and understand how things work. The interesting part of a paper is often hiding between the architecture diagram and the implementation. That is the space this notebook explores.&lt;/p&gt;
&lt;h2 id="what-you-will-find-here"&gt;What you will find here&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Machine learning foundations.&lt;/strong&gt; The math behind the operations, with shapes and small examples.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Computer vision.&lt;/strong&gt; From patches and features to object detection and localization.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practical engineering.&lt;/strong&gt; The memory, numerical, and implementation details that matter when theory becomes code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The approach is simple: start with the intuition, draw the information flow, write down the equation, then build a small implementation you can inspect.&lt;/p&gt;</description></item><item><title>cv_arrays.py</title><link>https://mlblogg.com/code-reader/cv_arrays/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/cv_arrays/</guid><description/></item><item><title>cv_channels.py</title><link>https://mlblogg.com/code-reader/cv_channels/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/cv_channels/</guid><description/></item><item><title>cv_masks.py</title><link>https://mlblogg.com/code-reader/cv_masks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/cv_masks/</guid><description/></item><item><title>cv_metrics.py</title><link>https://mlblogg.com/code-reader/cv_metrics/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/cv_metrics/</guid><description/></item><item><title>example-0a551db2f9d6.py</title><link>https://mlblogg.com/code-reader/example-0a551db2f9d6/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-0a551db2f9d6/</guid><description/></item><item><title>example-1d957bab42d8.py</title><link>https://mlblogg.com/code-reader/example-1d957bab42d8/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-1d957bab42d8/</guid><description/></item><item><title>example-6b948acb6a22.py</title><link>https://mlblogg.com/code-reader/example-6b948acb6a22/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-6b948acb6a22/</guid><description/></item><item><title>example-873288aad740.py</title><link>https://mlblogg.com/code-reader/example-873288aad740/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-873288aad740/</guid><description/></item><item><title>example-8d592b02a427.py</title><link>https://mlblogg.com/code-reader/example-8d592b02a427/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-8d592b02a427/</guid><description/></item><item><title>example-9bcc1aad30bb.py</title><link>https://mlblogg.com/code-reader/example-9bcc1aad30bb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-9bcc1aad30bb/</guid><description/></item><item><title>example-9d59422e9cb3.py</title><link>https://mlblogg.com/code-reader/example-9d59422e9cb3/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-9d59422e9cb3/</guid><description/></item><item><title>example-adfd4c0abdbe.py</title><link>https://mlblogg.com/code-reader/example-adfd4c0abdbe/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-adfd4c0abdbe/</guid><description/></item><item><title>example-bf85009a853c.py</title><link>https://mlblogg.com/code-reader/example-bf85009a853c/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/example-bf85009a853c/</guid><description/></item><item><title>foundations_numpy.py</title><link>https://mlblogg.com/code-reader/foundations_numpy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/foundations_numpy/</guid><description/></item><item><title>foundations_torch.py</title><link>https://mlblogg.com/code-reader/foundations_torch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/foundations_torch/</guid><description/></item><item><title>numpy_core.py</title><link>https://mlblogg.com/code-reader/numpy_core/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/numpy_core/</guid><description/></item><item><title>torch_core.py</title><link>https://mlblogg.com/code-reader/torch_core/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/torch_core/</guid><description/></item><item><title>train_copy.py</title><link>https://mlblogg.com/code-reader/train_copy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/train_copy/</guid><description/></item><item><title>verify_cv.py</title><link>https://mlblogg.com/code-reader/verify_cv/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/verify_cv/</guid><description/></item><item><title>verify.py</title><link>https://mlblogg.com/code-reader/verify/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://mlblogg.com/code-reader/verify/</guid><description/></item></channel></rss>