Gradient Comparison Table

Tabular comparison of analytical vs numerical gradients across operations — used to validate autograd implementations.

Preview
Gradient comparison: 0 of 4 rows agree within tolerance. x + y: analytical 1.000000, numerical 1.000010, fail. x · y: analytical 0.500000, numerical 0.499980, fail. x²: analytical 4.000000, numerical 4.000020, fail. softmax: analytical 0.210000, numerical 0.180000, fail.
OpAnalyticalNumericalErrorMatch
x + y1.0000001.0000101.000e-5Fail: exceeds tolerancefail
x · y0.5000000.4999802.000e-5Fail: exceeds tolerancefail
4.0000004.0000202.000e-5Fail: exceeds tolerancefail
softmax0.2100000.1800000.030000Fail: exceeds tolerancefail

Anatomy

Each row carries an op label, the analytical gradient, the numerical estimate, and an optional per-row tolerance. Rows whose absolute error exceeds the tolerance flip to cb-error and the badge changes from "match" to "fail".

Props

PropTypeDefaultDescription
rowsGradientComparisonRow[]requiredComparison rows.
showErrorbooleantrueRender the error column.

Accessibility

<table> with a caption summarising the overall pass/fail. Each row exposes data-cb-status for open styling.