onnxruntime/js/web/test/data/ops/leaky-relu.jsonc
Yulong Wang d13f3153d7
[js/webgpu] enable op test for webgpu (#16542)
### Description
This change enables the JSON-format operator tests for webgpu.

Usage:

```
npm test -- op abs.jsonc -b=webgpu
```
2023-07-06 08:35:19 -07:00

67 lines
1.3 KiB
Text

[
{
"name": "leakyRelu with no (default) attributes",
"operator": "LeakyRelu",
"attributes": [],
"cases": [
{
"name": "T[0]",
"inputs": [
{
"data": [-1.0, 0.0, 1.0, -2.0],
"dims": [1, 4],
"type": "float32"
}
],
"outputs": [
{
"data": [-0.01, 0.0, 1.0, -0.02],
"dims": [1, 4],
"type": "float32"
}
]
}
]
},
{
"name": "leakyRelu with specified attributes",
"operator": "LeakyRelu",
"attributes": [{ "name": "alpha", "data": 0.05, "type": "float" }],
"cases": [
{
"name": "T[0]",
"inputs": [
{
"data": [-1.0, 0.0, 1.0, 1.0],
"dims": [2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [-0.05, 0.0, 1.0, 1.0],
"dims": [2, 2],
"type": "float32"
}
]
},
{
"name": "Scalar",
"inputs": [
{
"data": [-1.0],
"dims": [],
"type": "float32"
}
],
"outputs": [
{
"data": [-0.05],
"dims": [],
"type": "float32"
}
]
}
]
}
]