Settings

Theme
Lite Mode (saves mobile data)

In Lite Mode, animations and videos don't play until you tap them, and their size is shown first. Interactive widgets still work.

Text size

Back up or move your progress →

Part 4: Neural Network Foundations

Embedding layers

P4.2140 min●●○ IntermediateReviewed Dec 3, 2026

Why this matters for machine learning

A network can only compute with numbers, and an ID such as a word or a product has no numeric meaning. An embedding layer gives every ID its own learned vector, so that IDs used in similar ways end up with nearby vectors.

  • A language model turns each token into a vector with an embedding table before any attention layer sees it, and queries, keys and values start from these token vectors. (P7.3: Queries, keys and values step by step, coming soon)
  • Word2vec trains word vectors by predicting neighbouring words, and the result is an embedding table. (P6.3: Word embeddings: word2vec, coming soon)
  • Order is added to the token vectors with a second table of position vectors. (P7.6: Positional encoding, coming soon)
  • A GPT-style model built from scratch starts with a token embedding and a position embedding. (P7.11: Build a GPT from scratch, coming soon)

Before this: The forward pass in matrix form, Backpropagation: step by step with numbers, Dot product and cosine similarity, Tensors, shapes and broadcasting

After this lesson you can

  • Explain why one-hot vectors are a poor input for a large vocabulary and what an embedding table replaces them with
  • Compute a lookup by hand, both as row indexing and as a one-hot vector times the table, and give the output shape for a batch of ids
  • Compute the gradient of a lookup, say which rows receive it and how a repeated id accumulates
  • Count the parameters of an embedding table and describe padding ids, unknown ids, tied weights and position tables

A network multiplies and adds numbers. But much of what we want it to read is not a number: a word, a user ID, a product code, a country. The first idea is to give each category a number, so that “cat” is 1, “dog” is 2 and “carburettor” is 3. That fails in an unobvious way: a weight multiplies the id, so id 4 would count twice as much as id 2, and “dog” would sit exactly between “cat” and “carburettor” for no reason at all. The ids are labels, not quantities.

The second idea is a one-hot vector (P3.A11): one slot for each of the VV categories, with a 11 in the slot of the category and 00 everywhere else. It is honest about the labels, but it has two faults:

  • It is huge and almost empty. For a vocabulary of V=50,000V=50{,}000 tokens, every token is a vector of 50,00050{,}000 numbers, and 49,99949{,}999 of them are zero.
  • It treats every pair as equally different. Any two different one-hot vectors are 2\sqrt2 apart and have cosine similarity 00 (P1.B3). To the network, “cat” is exactly as unlike “dog” as it is unlike “carburettor”, and nothing it learns about one carries over to the other.

An embedding layer fixes both. It gives every id a short vector of dd learned numbers (for example d=768d=768), and training moves the vectors so that ids used in similar ways get similar vectors. This lesson shows how the layer works, why its output is just a row of a table, how the table is trained, and what to watch for in practice.

The embedding table

Make a toy vocabulary of four tokens, numbered 00 to 33, with d=2d=2 numbers per token. These are the made-up values of the matrix-map lesson (P1.B15), not trained values. They are the rows of the embedding table, a matrix E\mathbf{E} with one row per id, so its shape is (V,d)=(4,2)(V,d)=(4,2):

E=(10110112)thecatsatmat\mathbf{E}=\begin{pmatrix}1&0\\1&1\\0&1\\1&2\end{pmatrix}\begin{matrix}\text{the}\\\text{cat}\\\text{sat}\\\text{mat}\end{matrix}

The embedding of id ii is row ii of E\mathbf{E}, written ei\mathbf{e}_i. The embedding of “cat” (id 11) is e1=(1,1)\mathbf{e}_1=(1,1). That is the whole layer: a lookup.

A lookup is a product, done as indexing

P1.B6 showed a product as a mix of rows. A one-hot vector, as a row, has a single 11 at the id, so it mixes the rows of E\mathbf{E} with weight 11 for one row and 00 for the others:

(0100)E=(11)=e1\begin{pmatrix}0&1&0&0\end{pmatrix}\mathbf{E}=\begin{pmatrix}1&1\end{pmatrix}=\mathbf{e}_1

For the two tokens “cat sat” (ids 11 and 22), stack the one-hot rows into a matrix S\mathbf{S} of shape (T,V)(T,V) and multiply:

SE=(01000010)E=(1101)\mathbf{S}\mathbf{E}=\begin{pmatrix}0&1&0&0\\0&0&1&0\end{pmatrix}\mathbf{E}=\begin{pmatrix}1&1\\0&1\end{pmatrix}

So a lookup is a matrix product with a one-hot matrix. Real code never builds S\mathbf{S}. Multiplying would cost V⋅dV\cdot d multiplications per token, almost all of them by zero, and would need a (T,V)(T,V) matrix. Indexing copies the dd numbers of the row and does no arithmetic: in NumPy E[ids], in PyTorch emb(ids). The two give identical numbers, and the equality matters because it tells us how gradients behave (see the section on how the table is learned).

A batch of ids

The ids are integers, not floats: they are positions in a table. A batch of BB sequences of TT ids is an integer tensor of shape (B,T)(B,T), and indexing the table with it gives a float tensor of shape (B,T,d)(B,T,d): every id is replaced by its row, and a new last axis of length dd appears. With the toy table and ids [[1, 2, 1], [3, 0, 2]] (two sequences of three tokens, B=2B=2, T=3T=3), the output has shape (2,3,2)(2,3,2): the first sequence becomes (1,1),(0,1),(1,1)(1,1),(0,1),(1,1) and the second (1,2),(1,0),(0,1)(1,2),(1,0),(0,1).

This is the (B,T,d)(B,T,d) tensor that the leading-axes box of P4.5 describes. A layer such as nn.Linear(d, d_out) that comes next acts on the last axis only, on each of the B⋅TB\cdot T vectors on its own. The widget builds the (T,d)(T,d) output for one sequence.

Tap tokens to build a sequence of up to 6 (each is a number, its id). Tap a token in the sequence to remove it.

Embedding table E, shape (V, d) = (8, 4). Row = id. Blue = positive, grey = negative, the number is always shown.
0 the −0.9−0.70.00.3 ×2
1 cat 1.00.70.6−0.2 ×1
2 dog 0.81.00.50.1 –
3 sat 0.9−0.8−0.60.4 ×1
4 ran 1.0−0.4−0.7−0.1 –
5 mat −0.90.80.40.2 ×1
6 rug −0.61.00.5−0.3 –
7 on −0.6−1.00.1−0.4 ×1
Output, shape (T, d) = (6, 4): row t is the row of E picked by the id at position t. Indexing copies the rows; nothing is multiplied.
t=0 the−0.9−0.70.00.3
t=1 cat1.00.70.6−0.2
t=2 sat0.9−0.8−0.60.4
t=3 on−0.6−1.00.1−0.4
t=4 the−0.9−0.70.00.3
t=5 mat−0.90.80.40.2
An embedding table with 8 tokens and 4 numbers each (made-up values, not trained). Tap tokens to build a sequence. Lookup: the rows you used are outlined, with a count of how often, and the output matrix stacks them, shape (T, d); the one-hot button shows the same output from S times E. Training step: a made-up gradient arrives at each output row, and the gradient of the table is nonzero only for the used rows, where a repeated token adds up. Similarity: the 8 rows as points (first two numbers), with the cosine of a chosen pair. Blue is positive, grey is negative, and the numbers are always shown.

Things to try. Build “cat cat cat” and watch row 11 appear three times in the output. Switch to Training step: row 11 gets the sum of three gradients, and the other seven rows get none. Add a token and the count of rows with gradient goes up by at most one.

How the table is learned

The table is a matrix of parameters, like the weights of P4.5. It starts random (PyTorch’s nn.Embedding draws every number from a normal distribution with mean 00 and standard deviation 11) and is trained by backpropagation (P4.8).

Write the lookup as Y=SE\mathbf{Y}=\mathbf{S}\mathbf{E} with S\mathbf{S} fixed (it only holds the ids). Suppose the layers above hand back G\mathbf{G}, the gradient of the loss with respect to Y\mathbf{Y}, one row for each position. The shape rule is the one for a layer’s weights: the fixed factor, transposed, times the upstream gradient. It gives

∇EL=S⊤G.\nabla_{\mathbf{E}}L=\mathbf{S}^\top\mathbf{G}.

Read it as a recipe: each position adds its row of G\mathbf{G} to the row of E\mathbf{E} that it used. Take “cat sat cat”, ids 1,2,11,2,1, and let the gradients arriving at the three positions be (1,2)(1,2), (3,−1)(3,-1) and (2,1)(2,1). Then:

  • Row 11 (“cat”) was used at positions 00 and 22, so it gets (1,2)+(2,1)=(3,3)(1,2)+(2,1)=(3,3).
  • Row 22 (“sat”) was used once, so it gets (3,−1)(3,-1).
  • Rows 00 and 33 were not used, so their gradient is (0,0)(0,0).

One gradient step with learning rate η=0.1\eta=0.1 changes only the used rows: row 11 goes from (1,1)(1,1) to (0.7,0.7)(0.7,0.7) and row 22 from (0,1)(0,1) to (−0.3,1.1)(-0.3,1.1). The rows of “the” and “mat” stay exactly as they were.

Two consequences follow:

  • Repeated ids add up. This is the “add with +=” rule of the autograd lesson (P4.9): a value used twice receives two contributions. It is also the most common bug when you write the backward pass by hand: in NumPy, g[ids] += G applies the update once per distinct id, so a repeated id loses all but one contribution (the first code cell shows (2,1)(2,1) instead of (3,3)(3,3)). The correct call is np.add.at(g, ids, G), which is what the matrix product S⊤G\mathbf{S}^\top\mathbf{G} computes.
  • The update is sparse. With plain gradient descent, a step changes only the rows that appeared in the batch. In a table with 50,00050{,}000 rows, a step updates at most as many rows as there are tokens in the batch, and a rare id is updated rarely, so its row can stay poorly trained. (An output layer that shares the table, or an optimizer with memory, can touch the other rows too. Both come back below.)

What the rows learn

Nothing tells the network what an id means. The rows only get pushed by the loss, and that is enough for structure to appear. If two ids lead to the same answers, the same later layers must turn both their vectors into the same output, so training pulls the two rows towards each other. Ids that are used in similar ways get nearby rows, and cosine similarity (P1.B3) measures how nearby.

A tiny experiment shows it (the second code cell). Take 99 made-up ids that secretly fall into 33 groups of three. The task is to predict one of three outcomes from the id alone, and the id’s group decides the outcome 8585 percent of the time. A learned linear layer reads each id’s row and scores the three outcomes (and is trained too). The table has d=2d=2 numbers per id, starting random, with one extra id, number 99, that never appears in the data. After 300 plain gradient steps:

  • The mean cosine between two ids of the same group goes from 0.050.05 to 1.001.00, and between ids of different groups from −0.03-0.03 to −0.49-0.49 (three groups spread out at about 120∘120^\circ in two numbers, which gives a cosine of about −0.5-0.5).
  • The loss on a fixed test sample goes from 1.531.53 to 0.510.51, close to the best this noisy task allows, about 0.530.53.
  • The row of the unused id 99 is unchanged, exactly as the sparse-update rule says.

Nobody told the model about the groups. The geometry of the table reflects how the ids are used in the task. For a table trained on text, the “task” is to predict words, so words that appear in similar contexts get similar rows. Word2vec (Mikolov and co-authors, 2013) trained word vectors with two simple architectures (CBOW and skip-gram) on a corpus of 1.6 billion words in under a day, and the 2013 paper reports that vector arithmetic such as vector(“King”)−vector(“Man”)+vector(“Woman”)\text{vector}(\text{“King”})-\text{vector}(\text{“Man”})+\text{vector}(\text{“Woman”}) lands closest to the vector of “Queen”. That is a reported result of a particular method, and P6.3 and P6.4 look at how it works and where it fails.

How big is the table?

The table has V⋅dV\cdot d parameters. For V=50,000V=50{,}000 and d=768d=768 that is 38,400,00038{,}400{,}000. The released GPT-2 small model (its config lists a vocabulary of 50,25750{,}257 and a width of 768768) has 50,257⋅768=38,597,37650{,}257\cdot768=38{,}597{,}376 numbers in its token table, about 154154 MB in 32-bit floats (taking 1 MB =1,000,000=1{,}000{,}000 bytes). A lookup is cheap, since it only copies dd numbers, but the table sits in memory in full. In a small language model the table can be a large share of all parameters. There is no rule for dd: a wider vector can hold more distinctions but costs more memory, and the right size depends on the task. Real tables range from a handful of numbers per id up to thousands.

Details that matter in practice

Padding. A batch needs sequences of the same length, so shorter ones are padded with a reserved id. PyTorch’s padding_idx makes the row of that id start as zeros and never receive gradient, so the padding row stays at zero. The model still has to be told to ignore padded positions elsewhere (masking, P7.8).

Unknown ids. An id outside the range 0,…,V−10,\dots,V-1 is an error, not a quiet zero. Text pipelines reserve one id for “unknown” and send every unseen word to it, or avoid unknowns by splitting words into pieces (P10.A2). For a category with many rare values, you can also give all rare values one shared row, or hash each value to one of a fixed number of rows (P3.A11), so that several categories share a row.

More than one categorical feature. A recommender may have a user ID and a product ID, each with its own table. Their vectors are combined, for example by joining them end to end, before the next layer.

Positions. Order is not in a token’s row: “dog bites man” and “man bites dog” would have the same rows. A common fix is a second table with one row per position, 0,…,Tmax⁡−10,\dots,T_{\max}-1, and the vector sent on is the token row plus the position row. The released GPT-2 small learned such a table with 1,0241{,}024 rows. P7.6 compares learned tables with fixed formulas.

Sharing the table with the output layer. A language model ends by scoring every one of the VV ids, with a layer whose weight matrix has shape (V,d)(V,d), the same shape as E\mathbf{E}. Weight tying uses one matrix for both. Press and Wolf (2017) recommended it for language models. It saves V⋅dV\cdot d parameters, and because the output layer scores every id, every row of the table now gets gradient at every step.

Depth: three ways to see it

Intuition

An embedding table is a rack of pigeonholes, one for each id, and each pigeonhole holds a card with dd numbers on it. A lookup reads the card in one pigeonhole. Training rewrites the cards: when the loss pushes, only the cards that were read are rewritten, and cards read in similar situations drift to look alike. The analogy breaks in two places. The pigeonhole numbers have no order (id 5 is not near id 6), and what a card means is not written anywhere, it is only visible in how it compares with the other cards.

Math

The layer is Y=SE\mathbf{Y}=\mathbf{S}\mathbf{E}, with S∈{0,1}T×V\mathbf{S}\in\{0,1\}^{T\times V} having one 11 per row, so Yt=Eidt\mathbf{Y}_{t}=\mathbf{E}_{\text{id}_t}. The gradient is ∇EL=S⊤G\nabla_{\mathbf{E}}L=\mathbf{S}^\top\mathbf{G}: row ii of it is the sum of the rows Gt\mathbf{G}_t over all positions tt with idt=i\text{id}_t=i, and it is the zero row if ii does not occur.

The lookup is also a linear layer without a bias: nn.Linear(V, d, bias=False) applied to a one-hot vector gives Wx=\mathbf{W}\mathbf{x}= column ii of W\mathbf{W}, so the table is W⊤\mathbf{W}^\top. The only difference is the cost, indexing against a product.

If the next operation is a linear layer, its weights can absorb any rotation Q\mathbf{Q} of the embedding space, E↦EQ\mathbf{E}\mapsto\mathbf{E}\mathbf{Q}, so a network with rotated embeddings and adjusted weights computes the same function. So training has no reason to give an individual axis (“number 0”, “number 1”) a meaning of its own: in this simple setting only the distances, angles and directions between rows are determined.

Code

import torch
import torch.nn as nn

torch.manual_seed(0)
big = nn.Embedding(10000, 64).weight.detach()
print("default init: mean %.2f, std %.2f" % (big.mean(), big.std()))

emb = nn.Embedding(num_embeddings=5, embedding_dim=3, padding_idx=0)
print("weight shape:", tuple(emb.weight.shape))
print("padding row :", emb.weight[0].tolist())

ids = torch.tensor([[1, 2, 1], [3, 0, 0]])      # (B, T); 0 = padding
out = emb(ids)
print("ids", tuple(ids.shape), "-> out", tuple(out.shape))
print("same as indexing :", torch.equal(out, emb.weight[ids]))

onehot = nn.functional.one_hot(ids, 5).float()  # (2, 3, 5)
print("one-hot @ E equal:", torch.allclose(onehot @ emb.weight, out))

out.sum().backward()
print("rows with gradient:", (emb.weight.grad != 0).any(1).tolist())
print("row 1 (used twice):", emb.weight.grad[1].tolist())
print("row 0 (padding)   :", emb.weight.grad[0].tolist())

print("parameters, 50257 x 768:",
      sum(p.numel() for p in nn.Embedding(50257, 768).parameters()))

Output from a local run with PyTorch 2.9.1:

default init: mean -0.00, std 1.00
weight shape: (5, 3)
padding row : [0.0, 0.0, 0.0]
ids (2, 3) -> out (2, 3, 3)
same as indexing : True
one-hot @ E equal: True
rows with gradient: [False, True, True, True, False]
row 1 (used twice): [2.0, 2.0, 2.0]
row 0 (padding)   : [0.0, 0.0, 0.0]
parameters, 50257 x 768: 38597376

nn.Embedding(num_embeddings, embedding_dim) is the table. With out.sum() as the loss, the gradient at every output number is 11, so row 11, used twice, gets 22 in every entry. Row 44 was never used and the padding row is switched off, so only rows 11, 22 and 33 have a gradient.

Go deeper Optimizers with memory touch unused rows

“Only the used rows change” holds for plain gradient descent. SGD with momentum (P4.13) keeps a running sum of past gradients and adds it at every step, so a row that was used in an earlier step keeps moving in a later step in which it was not used. A local check with PyTorch 2.9.1 and momentum 0.90.9 confirmed that a row used once moved again on the next step, in which the batch did not contain it. Adam keeps running averages of the gradient for every number, so a row used earlier keeps moving after its gradient has stopped, and weight decay (P4.17), when it is applied to the table, shrinks every row at every step. PyTorch offers sparse=True on nn.Embedding together with optimizers that update only the used rows, which trades this behaviour for speed and memory on huge tables (some options are not supported with sparse gradients: a local check with PyTorch 2.9.1 showed that plain Adam and SGD with weight decay raise an error, and SparseAdam exists for this case).

Go deeper Weight tying in more detail

With tying, the scores for the next token are z=hE⊤\mathbf{z}=\mathbf{h}\mathbf{E}^\top, where h\mathbf{h} is the final vector of dd numbers: the score of id ii is the dot product of h\mathbf{h} with the row ei\mathbf{e}_i. So the row of an id plays two roles: the vector for reading the id in, and the direction that gets a high score when the model predicts it. This requires the output layer to have the same width as the embedding. The saving for the lesson’s example, V=50,000V=50{,}000 and d=768d=768, is another 38,400,00038{,}400{,}000 parameters that would otherwise be stored separately. In the Hugging Face implementation of GPT-2 the two are tied by default (its config sets tie_word_embeddings to true). Not every model ties them, so check the model’s own configuration.

Try it in Python

The first cell uses the toy table of this lesson: a lookup as indexing and as a one-hot product, the cosines of the toy rows, and the gradient of a lookup with the repeated-id bug. The second cell is the training experiment of the section on what the rows learn.

Lookup, one-hot product and gradient

Runs real Python in your browser. First run downloads about 9 MB (once; your browser keeps it).

Running the cell gives shape (2,3,2)(2,3,2), equality of the two ways of looking up, the cosines 0.950.95, 0.710.71 and 0.000.00, row 11 of the wrong gradient (2,1)(2,1) and of the right one (3,3)(3,3), and the updated table with rows (0.7,0.7)(0.7,0.7) and (−0.3,1.1)(-0.3,1.1).

A tiny embedding learns groups

Runs real Python in your browser. First run downloads about 9 MB (once; your browser keeps it).

The cell prints a loss of 1.531.53 before and 0.510.51 after training, a mean cosine within groups of 0.050.05 before and 1.001.00 after, and across groups −0.03-0.03 before and −0.49-0.49 after, and that row 99 is unchanged. Because the test sample is finite and random, a loss slightly below the floor of 0.5270.527 can occur. Try a different seed, a smaller step size, or d=1d=1 and see what changes.

Common mistakes

Quiz

Check your understanding

  1. An embedding table has shape (1000,64)(1000, 64). A batch of integer ids has shape (8,20)(8, 20). What is the shape of the output of the lookup?

  2. In a vocabulary of 50,00050{,}000 tokens, what is the cosine similarity between the one-hot vectors of two different tokens?

  3. A batch contains the ids 3,3,73, 3, 7, and the table has 100100 rows. Which rows get a nonzero gradient from this batch?

  4. A model has an embedding table for 30,00030{,}000 ids with d=512d=512. How many parameters does the table have?

  5. What does padding_idx=0 in PyTorch’s nn.Embedding do?

Exercises

  1. With the toy table of this lesson, what is the product of the one-hot row for “mat” (id 33) with E\mathbf{E}, and what is cos⁡(cat,mat)\cos(\text{cat},\text{mat})?
    Show answerThe one-hot row is (0,0,0,1)(0,0,0,1), so the product is row 33 of E\mathbf{E}, (1,2)(1,2). The cosine of (1,1)(1,1) and (1,2)(1,2) is 1⋅1+1⋅22 5=310=0.95\dfrac{1\cdot1+1\cdot2}{\sqrt2\,\sqrt5}=\dfrac{3}{\sqrt{10}}=0.95.
  2. A model reads batches of 44 sequences of 1010 ids from a vocabulary of 5,0005{,}000, with d=32d=32. What is the shape of the output of the embedding layer, and how many parameters does the table have?
    Show answerThe output has shape (4,10,32)(4,10,32). The table has 5,000⋅32=160,0005{,}000\cdot32=160{,}000 parameters, whatever the batch size is.
  3. The ids are 0,3,30,3,3 with the toy table, and the gradients arriving at the three positions are (1,0)(1,0), (0,2)(0,2) and (1,1)(1,1). Find the gradient of E\mathbf{E}, and the table after one step with η=0.5\eta=0.5.
    Show answerRow 00 gets (1,0)(1,0) and row 33 gets (0,2)+(1,1)=(1,3)(0,2)+(1,1)=(1,3), and rows 11 and 22 get (0,0)(0,0). After the step row 00 is (1,0)−0.5(1,0)=(0.5,0)(1,0)-0.5(1,0)=(0.5,0) and row 33 is (1,2)−0.5(1,3)=(0.5,0.5)(1,2)-0.5(1,3)=(0.5,0.5). Rows 11 and 22 are unchanged, (1,1)(1,1) and (0,1)(0,1).
  4. A table for 100,000100{,}000 ids with d=300d=300 is stored in 32-bit floats (4 bytes each). How much memory does the table take?
    Show answerIt has 100,000⋅300=30,000,000100{,}000\cdot300=30{,}000{,}000 numbers, which is 120,000,000120{,}000{,}000 bytes, or 120120 MB (taking 1 MB =1,000,000=1{,}000{,}000 bytes).
  5. A language model has V=50,000V=50{,}000 and d=768d=768. How many parameters does an output layer of shape (V,d)(V,d) add if it is separate from the embedding table, and how many extra if the two are tied?
    Show answerSeparate: another 50,000⋅768=38,400,00050{,}000\cdot768=38{,}400{,}000 parameters (ignoring a bias). Tied: no extra parameters, because the output layer reuses the table.

Next: P4.22 gives a training recipe and debugging routine for networks like the ones built so far, and P6.3 shows how word vectors are trained from text. P7.6 adds positions to token vectors, and P7.3 shows what attention does with them.

Key takeaways

  • An embedding table E\mathbf{E} has shape (V,d)(V,d): one row of dd learned numbers for each of the VV ids. The embedding of id ii is row ii. The ids themselves are only labels, so id 5 is not “between” id 4 and id 6.
  • A lookup equals a one-hot vector times E\mathbf{E}, but real code indexes the table, which copies dd numbers instead of multiplying V⋅dV\cdot d. A batch of ids of shape (B,T)(B,T) becomes a tensor of shape (B,T,d)(B,T,d).
  • The table is learned like any weights. With output =SE=\mathbf{S}\mathbf{E}, the gradient is S⊤G\mathbf{S}^\top\mathbf{G}: only the used rows get gradient, and a repeated id receives the sum of all its positions.
  • Ids that are used in similar ways are pushed to similar rows, so cosine similarity of rows measures how alike two ids behave. An individual axis of an embedding usually has no meaning of its own.
  • The table has V⋅dV\cdot d parameters (38.4 million for 50,000 ids and d=768d=768). Practical details: a padding id whose row gets no gradient, an unknown-id row, position tables, and an output layer that can share the table.
Found a mistake? Tell us