- scripts/lint.py: reject raw rectangles, absolute coordinates, hue-budget and callout/group/formula-order violations at the source level - tests/invalid/ + tests/lint-invalid/: negative fixtures proving the package and linter reject bad input; test.sh now runs both directions - references/fallback.md: degraded path when no LaTeX is available - tests/group-callout.tex: exercise \stgroup and \stcallout - agents/openai.yaml: agent config - Docs and .sty updated to match
40 lines
1.2 KiB
TeX
40 lines
1.2 KiB
TeX
% supertensor-lint: allow-absolute, allow-missing-formula
|
|
% Legacy absolute-placement smoke test; flow layout is covered by flow.tex.
|
|
\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}
|