W gives [7, -1] for x, and the bottleneck x @ A.T is -2. With scale 2 and B = [0.5, -1], what does the trained layer give?
Pick one to see what it prints.
One layer through its life, on x=[1,2,3]:
Stage
What changed
Output
Why
At creation
B⊤=[0,0]
[7, -1]
the branch adds 0
Trained
B⊤=[0.5,−1]
[5, 3]
[7, -1] + [-2, 4]
Merged
W′=W+2BA
[5, 3]
one plain matmul
Unmerged
W back
[5, 3]
the branch is on again
The merge in numbers:
BA=[0.5−100−0.51],W′=W+2BA=[2−20111]
and xW′⊤=[2+0+3,−2+2+3]=[5,3], the same as the unmerged layer.
In the editor are the worked example's W, A, B and scale, with a new input, x = [2, 0, 1]. Set base: the frozen layer's output. Set trained: the base plus the scaled branch. Set W_merged: the weight with the scaled update folded in, and merged: x through W_merged.
Pick an answer above to see the rest
Instructions
1
Set base: the frozen layer's output for x.
2
Set trained: the base plus the scaled branch.
3
Set W_merged: the weight with the scaled update folded in, and merged: its output for x.