onnxruntime/js/web/test/data/ops
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
..
_example.jsonc
abs-int32.jsonc
abs.jsonc
absr.jsonc
abss.jsonc
acos.jsonc
add.jsonc
add_int32.jsonc
and.jsonc
asin.jsonc
attention.jsonc
batch-norm.jsonc
bias-add.jsonc
bias-split-gelu.jsonc
cast.jsonc
ceil.jsonc
concat.jsonc
concat_int32.jsonc
conv-transpose.jsonc
conv.jsonc [js/webgpu] Provide a vectorized algorithm for GroupedConv (#18884) 2024-01-10 16:12:43 -08:00
cos.jsonc
cumsum.jsonc [js/webgpu] Fix shader compilation errors in cumsum (#18779) 2023-12-11 18:11:38 -08:00
depth-to-space.jsonc
div.jsonc
div_int32.jsonc
einsum.jsonc
equal.jsonc
exp.jsonc
expand.jsonc [js/webgpu] Fix Expand/Gather when input type is bool (#18999) 2024-01-05 08:16:15 -08:00
floor.jsonc
fused-conv.jsonc [js/webgpu] Add FusedConv clip test case (#18900) 2024-01-23 08:25:05 -08:00
gather-elements.jsonc
gather.jsonc [js/webgpu] Fix Expand/Gather when input type is bool (#18999) 2024-01-05 08:16:15 -08:00
gelu.jsonc
gemm.jsonc
global-average-pool.jsonc
greater.jsonc
identity.jsonc
image-scaler.jsonc
instance-norm.jsonc [js/webgpu] Support uniforms for instance-norm (#18929) 2024-01-09 14:56:00 -08:00
layer-norm.jsonc
leaky-relu.jsonc
less.jsonc
log.jsonc
matmul-broadcast.jsonc
matmul.jsonc
mul.jsonc
mul_int32.jsonc
multi-head-attention.jsonc
neg-int32.jsonc
neg.jsonc
not.jsonc
or.jsonc
pad-big.jsonc
pad.jsonc
pow-big-number.jsonc
pow.jsonc
pow_int32.jsonc
reduce-min.jsonc
relu.jsonc
reshape-int32.jsonc
reshape-pack.jsonc
reshape.jsonc
resize-pack.jsonc
resize.jsonc [JS/Web] Sajandhy/webgpu resize scales rank check (#18954) 2023-12-29 09:23:27 -08:00
shape.jsonc
sin.jsonc
skip-layer-norm.jsonc
slice.jsonc
softmax.jsonc
split.jsonc
sqrt.jsonc
sub.jsonc
sub_int32.jsonc
tan.jsonc
tanh.jsonc [js/webgpu] Fix Tanh explosion (#19201) 2024-01-25 08:25:35 -08:00
tile.jsonc
transpose.jsonc
transpose_int32_uint32.jsonc
upsample.jsonc [JS/WebGPU] Add trilinear interpolation to Resize; activation_params attribute is optional for FusedConv also. (#18842) 2023-12-27 16:21:29 -08:00
where.jsonc
where_broadcast.jsonc
xor.jsonc