Archive — one question answered
What is a vector in deep learning?
Why does every neural network input get packed into one numeric vector?
A vector is an ordered list of numbers. In deep learning, every example — a flattened image, a sentence turned into token indices, or three spam indicators — is stored as a vector .
Concrete case: an email has promotional words, links, and for an unknown sender. Pack them as with fixed length . The network always expects exactly three numbers in the same order; permuting the entries changes the meaning.
In Python:
x = [2, 0, 1]
assert len(x) == 3Matrix multiplication — a Linear layer in PyTorch — is defined on this column vector: . Without vectorization, heterogeneous form fields force hand-written loops per feature, which wastes GPUs and breaks batch training.
So a vector is not decorative jargon. It is the standard way to turn every input into one mathematical object so a neural net can process thousands of examples in parallel.