(made with Claude Code and ChatGPT)
MIT 6.7960 — Approximation Theory

Width vs Depth

Choose a hidden-neuron budget N, then vary width / depth. Does a wide shallow network or a narrow deep one fit better?

32
1.0×
0.1
width 6 × depth 6 = 36 neurons
iter 0 MSE —
target f(x)
MLP fit

Compare architectures

Final MSE after 5,000 steps per network

How the sweep works

Sweep trains 9 fresh networks from scratch — one per aspect ratio, spread from deep/narrow to wide/shallow — using the current N, learning rate, and target. Each runs for 5 000 SGD steps, then its final MSE is plotted. The dashed line marks the aspect ratio currently set above. The best config is circled. Equal neuron counts do not imply equal parameter counts; rounded widths and depths may differ from the requested budget.