The Archimedes receives a mysterious data stream from deep space.
We're picking up a structured data stream from Sector 7-G. ARIA has been chewing on it for six hours.
Six hours, fourteen minutes. I have applied 4,096 parsing rules to the stream. All have failed. Whatever this is, nobody wrote a rule for it.
Then we need someone who doesn't start from rules. Demir, you think in data structures. Start there.
You've worked with arrays your entire career: DOM elements, API responses, pixel data. A stores its numbers much the way a Float32Array does: flat, typed, contiguous. What it adds is tracking, GPU-backed math, and a memory lifecycle you have to manage. That's the whole gap this lesson closes.
A tensor is a multi-dimensional array with opinions. The numbers sit in contiguous memory exactly like a Float32Array; what's new is everything wrapped around them.
Float32Array in JavaScript and tf.tensor in TensorFlow.js both store numbers in contiguous memory. The difference is that tensors know their shape and come with GPU-accelerated math operations.
One difference to internalize early: you can iterate a Float32Array directly, but a tensor's data lives on the backend. Call await t.array() (or dataSync()) to pull the values back into JavaScript.
Here's the lifecycle promise from the top of the lesson, paid in full. When the backend is active, a tensor's numbers live in GPU texture memory, and the JavaScript garbage collector cannot see GPU memory. Drop your last reference to a tensor and the JS wrapper gets collected; the texture it owned does not. Create tensors in a loop and you have written a memory leak in a language you thought couldn't leak.
Two tools fix this:
If tf.tidy() reminds you of a useEffect cleanup function, good. Same contract: you acquired a resource the runtime can't track, so you say when it's done. We'll lean on tidy() in every lesson that touches real data.
Now it's your turn. Create your first tensor from a JavaScript array.
DISPATCH archive · field intercept #02-T: Yara's collective uses the same shape contract for image latents in Nova Canvas:
[batch, channels, h, w]. Different domain, same primitive. The tensor is the lingua franca; the meaning is the lesson.