I would expect only three linear/Dense layers on the figure, not nine.


What am I missing here? 

Nothing. The code is correct, and simpler (+more efficient?) this way, with only one big linear layer. I didn’t have a good way to edit the figure.  And I can’t switch it to EinsumDense yet.
If there’s something missing here it’sa  sentence or two in the notebook explaining. Any chance you could send PR?