mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
### Description This change enables the JSON-format operator tests for webgpu. Usage: ``` npm test -- op abs.jsonc -b=webgpu ```
67 lines
1.3 KiB
Text
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"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|