onnxruntime/js/web/test/data/ops/split.jsonc
Yulong Wang 641c3a4a37
[js/web] update op test schema (#16921)
### Description
update op test schema.

This changes fixes several problems for operator tests for web:
- `opsets` -> `opset`: an operator uses exactly one opset instead of
multiple
- `condition` -> `platformCondition`: make it less confusing
- `inputShapeDefinitions`: allows to test ORT behaviors when it get
no/partial/full shape info.

Added a JSON schema file and also an example file
2023-08-03 14:20:20 -07:00

68 lines
1.5 KiB
Text

[
{
"name": "Split on Axis 0",
"operator": "Split",
"opset": { "domain": "", "version": 12 },
"attributes": [
{ "name": "axis", "data": 0, "type": "int" },
{ "name": "split", "data": [2, 4], "type": "ints" }
],
"cases": [
{
"name": "T[6]",
"inputs": [
{
"data": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0],
"dims": [6],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 2.0],
"dims": [2],
"type": "float32"
},
{
"data": [3.0, 4.0, 5.0, 6.0],
"dims": [4],
"type": "float32"
}
]
}
]
},
{
"name": "Split on Axis 1 - 2D",
"operator": "Split",
"opset": { "domain": "", "version": 12 },
"attributes": [
{ "name": "axis", "data": 1, "type": "int" },
{ "name": "split", "data": [2, 4], "type": "ints" }
],
"cases": [
{
"name": "T[6]",
"inputs": [
{
"data": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0],
"dims": [2, 6],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 2.0, 7.0, 8.0],
"dims": [2, 2],
"type": "float32"
},
{
"data": [3.0, 4.0, 5.0, 6.0, 9.0, 10.0, 11.0, 12.0],
"dims": [2, 4],
"type": "float32"
}
]
}
]
}
]