onnxruntime/js/web/test
Jiajie Hu 5b06505073
[js/webgpu] Fix Tanh explosion (#19201)
### Description
```math
\tanh(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}=
\left\{
\begin{array}{cc}
-\frac{1-e^{-2\cdot(-x)}}{1+e^{-2\cdot(-x)}}, & x<0 \\
0, & x=0 \\
\frac{1-e^{-2x}}{1+e^{-2x}}, & x>0
\end{array}
\right.
```

### Motivation and Context
On some platforms,
$$\tanh(1000)=\frac{e^{1000}-e^{-1000}}{e^{1000}+e^{-1000}}$$ would
produce NaN instead of 0.999... or 1 (imagine $e^{1000}=\infty$ and
$\frac{\infty}{\infty}$ explodes).
2024-01-25 08:25:35 -08:00
..
data/ops [js/webgpu] Fix Tanh explosion (#19201) 2024-01-25 08:25:35 -08:00
e2e [js] enable external data loading for ort-web (#19087) 2024-01-12 19:24:24 -08:00
training/e2e [js/web/training] added end-to-end tests (#18700) 2024-01-12 13:33:33 -08:00
unittests [js/web] set noUnusedParameters to true and fix a few bugs (#18404) 2023-11-15 09:16:29 -08:00
op-test-schema.json [js/web] allow optional input/output in operator test (#17184) 2023-08-16 11:50:11 -07:00
suite-test-list.jsonc [js/webgpu] Fix Tanh explosion (#19201) 2024-01-25 08:25:35 -08:00
test-main.ts [WebNN] Enable npm unit tests (#18486) 2024-01-09 10:10:57 -08:00
test-runner.ts [web] remove xnnpack from web backends (#19116) 2024-01-13 23:04:02 -08:00
test-shared.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
test-types.ts [WebNN] Enable npm unit tests (#18486) 2024-01-09 10:10:57 -08:00