Repository Public License Research preview
1% S03-F05 — Des couches empilées au décodage jeton par jeton.2% Idée : la suite de jetons traverse une pile de couches identiques (attention, puis transformation) ; seul le3% vecteur de la dernière position sert à prédire le jeton suivant ; le jeton choisi rejoint la suite et tout4% recommence. Les nombres sont ceux de la miniature (une couche, une tête).5% DONNÉES : S03-F05-donnees.tex, généré par demos/src/atlas_s03/exporter_donnees_figure.py.6\input{S03-F05-donnees.tex}%7\begin{tikzpicture}[x=1mm, y=1mm]8 % Suite de jetons9 \node[atlas note, anchor=south west] at (0,47.2) {Suite de jetons};10 \AtlasTokenRow{t}{(0,43.6)}{cabinet,d',avocat}11 \node[atlas token ghost] (new) at ([xshift=11mm]t-3.east) {\STval{F05-mot-1}};12 \node[atlas note, anchor=west] at ([xshift=1mm]new.east) {jeton choisi};13 % Entrée14 \node[atlas block, text width=19mm, minimum height=15mm] (in) at (11.5,20.5) {\textbf{Vecteurs}\\ un par jeton, avec sa position};15 % Pile de couches16 \draw[atlas region, fill=atlasPanel, fill opacity=.35] (29.4,10.4) rectangle (84.6,33.6);17 \draw[atlas region, fill=atlasPanel, fill opacity=.6] (27.7,8.7) rectangle (82.9,31.9);18 \draw[atlas region, draw=atlasFlow, fill=atlasBg] (26,7) rectangle (81.2,30.2);19 \node[atlas tag=atlasFlow, anchor=west] at (29,7) {UNE COUCHE, répétée N fois};20 \node[atlas block flow, text width=21mm, minimum height=13.5mm] (att) at (40,17.4) {\textbf{Attention}\\ les jetons échangent};21 \node[atlas block, text width=21mm, minimum height=13.5mm] (mlp) at (67.2,17.4) {\textbf{Transformation}\\ jeton par jeton};22 \draw[atlas arrow] (att) -- (mlp);23 % Sortie24 \node[atlas block, text width=19mm, minimum height=15mm] (out) at (99.5,20.5) {\textbf{Tête de sortie}\\ un score par jeton possible};25 \draw[atlas arrow] (in.east) -- (26,20.5);26 \draw[atlas arrow] (84.6,20.5) -- (out.west);27 \draw[atlas link] ([yshift=-1.2mm]t-1.south west) -- ([yshift=-1.2mm]t-3.south east);28 \draw[atlas arrow] (11.5,39.4) -- (11.5,28.6);29 \node[atlas note, anchor=west] at (13,34.4) {toute la suite};30 % Distribution31 \foreach \k/\y in {1/27, 2/20.5, 3/14} {32 \edef\atlasp{\STval{F05-droit-brut-\k}}33 \node[atlas label, anchor=east, font=\ttfamily\AtlasSizeLabel] at (124.4,\y) {\STval{F05-mot-\k}};34 \draw[atlasFlow, line width=3.2mm, line cap=butt] (125.4,\y) -- ({125.4+12*\atlasp},\y);35 \node[atlas note, anchor=west, text=atlasFg, font=\AtlasTabularFont\AtlasSizeTiny] at ({126.2+12*\atlasp},\y) {\STval{F05-droit-p-\k}};36 }37 \draw[atlasRule, line width=.8pt] (125.4,10.6) -- (125.4,30.4);38 \draw[atlas arrow] (out.east) -- (112.6,20.5);39 \draw[atlas arrow valid] (128,31.4) -- (128,37.5) -| (new.south);40 \node[atlas note, anchor=west] at (129.2,35) {choisir};41 % Annotations42 \node[atlas note, anchor=north west, text width=88mm] at (0,4.6)43 {Seul le vecteur de la dernière position, ici \STval{F05-droit-vecteur}, sert à prédire le jeton suivant.};44 \node[atlas note, anchor=north east, align=right, text width=50mm] at (142,4.6)45 {Puis la suite allongée repasse par toute la pile.};46\end{tikzpicture}47