onnxruntime/js/web/test/data/ops/upsample.jsonc
satyajandhyala 3bbe4fe2ff
[JS/WebGPU] Add trilinear interpolation to Resize; activation_params attribute is optional for FusedConv also. (#18842)
### Description
Add trilinear interpolation to Resize and changed activation_params attribute as optional for FuseConv.



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2023-12-27 16:21:29 -08:00

366 lines
9.8 KiB
Text

[
{
"name": "Upsample - Nearest",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [{ "name": "scales", "data": [1.0, 1.0, 2.0, 3.0], "type": "floats" }],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.0, 1.0, 3.0, 3.0, 3.0, 1.0, 1.0, 1.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 5.0, 5.0, 5.0, 3.0, 3.0, 3.0,
5.0, 5.0, 5.0,
3.0, 3.0, 3.0, 5.0, 5.0, 5.0, 3.0, 3.0, 3.0, 5.0, 5.0, 5.0, 7.0, 7.0, 7.0, 9.0, 9.0, 9.0, 7.0, 7.0, 7.0,
9.0, 9.0, 9.0
],
"dims": [1, 2, 4, 6],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - Nearest2X",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [{ "name": "scales", "data": [1.0, 1.0, 2.0, 2.0], "type": "floats" }],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.0, 3.0, 3.0, 1.0, 1.0, 3.0, 3.0, 3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0,
3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0, 7.0, 7.0, 9.0, 9.0, 7.0, 7.0, 9.0, 9.0
],
"dims": [1, 2, 4, 4],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - Nearest222X",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [{ "name": "scales", "data": [2.0, 1.0, 2.0, 2.0], "type": "floats" }],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.0, 3.0, 3.0, 1.0, 1.0, 3.0, 3.0, 3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0,
3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0, 7.0, 7.0, 9.0, 9.0, 7.0, 7.0, 9.0, 9.0,
1.0, 1.0, 3.0, 3.0, 1.0, 1.0, 3.0, 3.0, 3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0,
3.0, 3.0, 5.0, 5.0, 3.0, 3.0, 5.0, 5.0, 7.0, 7.0, 9.0, 9.0, 7.0, 7.0, 9.0, 9.0
],
"dims": [2, 2, 4, 4],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - Nearest15X",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [{ "name": "scales", "data": [1.0, 1.0, 2.0, 1.5], "type": "floats" }],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.0, 3.0, 1.0, 1.0, 3.0, 3.0, 3.0, 5.0, 3.0, 3.0, 5.0,
3.0, 3.0, 5.0, 3.0, 3.0, 5.0, 7.0, 7.0, 9.0, 7.0, 7.0, 9.0
],
"dims": [1, 2, 4, 3],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - Nearest_NoScale",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 1.0, 1.0, 1.0], "type": "floats" },
{ "name": "mode", "data": "nearest", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 4D Bilinear",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 1.0, 2.0, 4.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [2, 1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.5, 2.0, 2.5, 3.0, 3.0, 3.0, 3.0, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5, 4.0, 4.5, 5.0,
5.0, 5.0, 5.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0,
3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0, 5.0, 5.5, 6.0, 6.5, 7.0, 7.0, 7.0, 7.0, 7.0, 7.5, 8.0, 8.5, 9.0,
9.0, 9.0, 9.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.0, 9.0, 9.0
],
"dims": [2, 1, 4, 8],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 2D Bilinear",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [2.0, 4.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0],
"dims": [2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.5, 2.0, 2.5, 3.0, 3.0, 3.0, 3.0, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5, 4.0, 4.5, 5.0,
5.0, 5.0, 5.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0
],
"dims": [4, 8],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 4D Bilinear ScalesNoOp",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 1.0, 1.0, 1.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [2, 1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [2, 1, 2, 2],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 1D Nearest",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [2.0], "type": "floats" },
{ "name": "mode", "data": "nearest", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 2.0, 3.0, 4.0, 5.0],
"dims": [5],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 1.0, 2.0, 2.0, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0],
"dims": [10],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 5D Trilinear",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 1.0, 1.0, 2.0, 4.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [1, 2, 1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.5, 2.0, 2.5, 3.0, 3.0, 3.0, 3.0, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5, 4.0, 4.5, 5.0,
5.0, 5.0, 5.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0,
3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0, 5.0, 5.5, 6.0, 6.5, 7.0, 7.0, 7.0, 7.0, 7.0, 7.5, 8.0, 8.5, 9.0,
9.0, 9.0, 9.0, 7.0, 7.5, 8.0, 8.5, 9.0, 9.0, 9.0, 9.0
],
"dims": [1, 2, 1, 4, 8],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 3D Trilinear",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 2.0, 4.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0],
"dims": [1, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [
1.0, 1.5, 2.0, 2.5, 3.0, 3.0, 3.0, 3.0, 2.0, 2.5, 3.0, 3.5, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5, 4.0, 4.5, 5.0,
5.0, 5.0, 5.0, 3.0, 3.5, 4.0, 4.5, 5.0, 5.0, 5.0, 5.0
],
"dims": [1, 4, 8],
"type": "float32"
}
]
}
]
},
{
"name": "Upsample - 3D Trilinear ScalesNoOp",
"operator": "Upsample",
"opset": { "domain": "", "version": 7 },
"attributes": [
{ "name": "scales", "data": [1.0, 1.0, 1.0], "type": "floats" },
{ "name": "mode", "data": "linear", "type": "string" }
],
"cases": [
{
"name": "X",
"inputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [2, 2, 2],
"type": "float32"
}
],
"outputs": [
{
"data": [1.0, 3.0, 3.0, 5.0, 3.0, 5.0, 7.0, 9.0],
"dims": [2, 2, 2],
"type": "float32"
}
]
}
]
}
]