onnxruntime/js/web/test/data/ops/resize-pack.jsonc
2021-08-12 12:30:49 -07:00

432 lines
8.4 KiB
Text

[
{
"name": "ResizeBilinearPacked with mode half_pixel",
"operator": "Resize",
"opsets": [
{
"domain": "",
"version": "11"
}
],
"attributes": [
// { "name": "scales", "data": [1.0, 1.0, 2.0, 3.0], "type": "floats" },
{
"name": "coordinate_transformation_mode",
"data": "half_pixel",
"type": "string"
},
{
"name": "mode",
"data": "linear",
"type": "string"
}
],
"cases": [
{
"name": "T[0,3]",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [1, 1, 2, 2],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 2, 2],
"dims": [4],
"type": "float32"
}
],
"outputs": [
{
"data": [
1,
1.25,
1.75,
2,
1.5,
1.75,
2.25,
2.5,
2.5,
2.75,
3.25,
3.5,
3,
3.25,
3.75,
4
],
"dims": [1, 1, 4, 4],
"type": "float32"
}
]
}
]
},
{
"name": "ResizeBilinearPacked with mode align_corners",
"operator": "Resize",
"opsets": [
{
"domain": "",
"version": "11"
}
],
"attributes": [
{
"name": "coordinate_transformation_mode",
"data": "align_corners",
"type": "string"
},
{
"name": "mode",
"data": "linear",
"type": "string"
}
],
"cases": [
{
"name": "T[0,3]",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [1, 1, 2, 2],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 2, 2],
"dims": [4],
"type": "float32"
}
],
"outputs": [
{
"data": [
1,
1.3333,
1.6666,
2,
1.6666,
2,
2.3333,
2.6666,
2.3333,
2.6666,
3,
3.3333,
3,
3.3333,
3.6666,
4
],
"dims": [1, 1, 4, 4],
"type": "float32"
}
]
}
]
},
{
"name": "ResizeBilinearPacked with asymmetric",
"operator": "Resize",
"opsets": [
{
"domain": "",
"version": "11"
}
],
"attributes": [
{
"name": "coordinate_transformation_mode",
"data": "asymmetric",
"type": "string"
},
{
"name": "mode",
"data": "linear",
"type": "string"
}
],
"cases": [
{
"name": "input 1x1x2x2 with scales",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [1, 1, 2, 2],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 2, 2],
"dims": [4],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0,
1.5,
2.0,
2.0,
2.0,
2.5,
3.0,
3.0,
3.0,
3.5,
4.0,
4.0,
3.0,
3.5,
4.0,
4.0
],
"dims": [1, 1, 4, 4],
"type": "float32"
}
]
},
{
"name": "input 1x1x2x2 with sizes",
"inputs": [
{
"data": [1, 2, 3, 4],
"dims": [1, 1, 2, 2],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 4, 4],
"dims": [4],
"type": "int32"
}
],
"outputs": [
{
"data": [
1.0,
1.5,
2.0,
2.0,
2.0,
2.5,
3.0,
3.0,
3.0,
3.5,
4.0,
4.0,
3.0,
3.5,
4.0,
4.0
],
"dims": [1, 1, 4, 4],
"type": "float32"
}
]
},
{
"name": "input 1x1x4x3 with sizes",
"inputs": [
{
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
"dims": [1, 1, 4, 3],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 3, 2],
"dims": [4],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0,
1.5,
2.0,
2.5,
3.0,
3.0,
2.0,
2.5,
3.0,
3.5,
4.0,
4,
3.0,
3.5,
4.0,
4.5,
5.0,
5.0,
4.0,
4.5,
5.0,
5.5,
6.0,
6.0,
5.0,
5.5,
6.0,
6.5,
7.0,
7.0,
6.0,
6.5,
7.0,
7.5,
8.0,
8.0,
7.0,
7.5,
8.0,
8.5,
9.0,
9.0,
8.0,
8.5,
9.0,
9.5,
10.0,
10.0,
9.0,
9.5,
10.0,
10.5,
11.0,
11.0,
10.0,
10.5,
11.0,
11.5,
12.0,
12.0,
10.0,
10.5,
11.0,
11.5,
12.0,
12.0,
10.0,
10.5,
11.0,
11.5,
12.0,
12.0
],
"dims": [1, 1, 12, 6],
"type": "float32"
}
]
},
{
"name": "input 1x2x3x2 with sizes",
"inputs": [
{
"data": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
"dims": [1, 2, 3, 2],
"type": "float32"
},
{
"data": [],
"dims": [0],
"type": "float32"
},
{
"data": [1, 1, 2, 2],
"dims": [4],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0,
1.5,
2.0,
2.0,
2.0,
2.5,
3.0,
3.0,
3.0,
3.5,
4.0,
4.0,
4.0,
4.5,
5.0,
5.0,
5.0,
5.5,
6.0,
6.0,
5.0,
5.5,
6.0,
6.0,
7.0,
7.5,
8.0,
8.0,
8.0,
8.5,
9.0,
9.0,
9.0,
9.5,
10.0,
10.0,
10.0,
10.5,
11.0,
11.0,
11.0,
11.5,
12.0,
12.0,
11.0,
11.5,
12.0,
12.0
],
"dims": [1, 2, 6, 4],
"type": "float32"
}
]
}
]
}
]