\documentclass[border=8pt]{standalone} \usepackage[cjk]{supertensor} \stsetrole{x}{stTeal} \stsetrole{w}{stOrange} \stsetrole{h}{stViolet} \stdim{m}{6} \stdim{k}{4} \stdim{n}{5} \begin{document} \begin{tikzpicture} \stface[role=x, pattern=dense, bracket=true]{X}{(0,0)}{m}{k} \stcaption{X}{$\mathbf X$}{$m\times k$} \node[st op, right=4mm of X] (mul) {$\times$}; \stface[role=w, pattern=dense, bracket=true]{W}{($(mul)+(1.6,0)$)}{k}{n} \stcaption{W}{$\mathbf W$}{$k\times n$} \node[st op, right=4mm of W] (eq) {$=$}; \stface[role=h, pattern=dense, bracket=true]{H}{($(eq)+(1.8,0)$)}{m}{n} \stcaption{H}{$\mathbf H$}{$m\times n$} \ststack[role=x, pattern=causal]{S}{($(H)+(3.4,0)$)}{k}{k}{3} \stcaption{S}{$\mathbf S$}{$b\times k\times k$} \node[inner sep=0pt, fit=(X)(S)(H-shape)] (all) {}; \stmeaningbox{mb}{13cm}{all} {$m$ 行、$k$ 收缩维、$n$ 输出维} {$\mathbf X$ 激活值,$\mathbf W$ 权重,$\mathbf S$ 因果分数} {$(m\times k)(k\times n)\rightarrow(m\times n)$} \stsignature{Smoke test}{mb} \end{tikzpicture} \end{document}