summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/resources/test_data/arg_max.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/arg_max.json')
-rw-r--r--testing/web-platform/tests/webnn/resources/test_data/arg_max.json963
1 files changed, 963 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/arg_max.json b/testing/web-platform/tests/webnn/resources/test_data/arg_max.json
new file mode 100644
index 0000000000..d2fe9e62ca
--- /dev/null
+++ b/testing/web-platform/tests/webnn/resources/test_data/arg_max.json
@@ -0,0 +1,963 @@
+{
+ "tests": [
+ {
+ "name": "argMax float32 1D constant tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [24],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 1D tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [24],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 2D tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [4, 6],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 3D tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [2, 3, 4],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 5D tensor default options",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 1, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[2]",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [2]
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 1, 3],
+ "data": [
+ 1,
+ 2,
+ 2,
+ 1,
+ 2,
+ 2
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[]",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": []
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 1, 4, 3],
+ "data": [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.keepDimensions=true",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "keepDimensions": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 1, 1, 1],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.keepDimensions=false",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "keepDimensions": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.selectLastIndex=true",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "selectLastIndex": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 20
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.selectLastIndex=false",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "selectLastIndex": false
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 3
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[0, 2] options.keepDimensions=false",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [0, 2],
+ "keepDimensions": false
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 3],
+ "data": [
+ 1,
+ 2,
+ 2
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.keepDimensions=true",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [3, 0, 1],
+ "keepDimensions": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 1, 4, 1],
+ "data": [
+ 2,
+ 0,
+ 2,
+ 1
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=false",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [0, 2],
+ "selectLastIndex": false
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 3],
+ "data": [
+ 1,
+ 2,
+ 2
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=true",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [0, 2],
+ "selectLastIndex": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 3],
+ "data": [
+ 5,
+ 6,
+ 6
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=false",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [3, 0, 1],
+ "selectLastIndex": false
+ },
+ "expected": {
+ "name": "output",
+ "shape": [4],
+ "data": [
+ 2,
+ 0,
+ 2,
+ 1
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=true",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [3, 0, 1],
+ "selectLastIndex": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [4],
+ "data": [
+ 5,
+ 3,
+ 5,
+ 4
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 4D tensor all options",
+ "inputs": {
+ "input": {
+ "shape": [2, 1, 4, 3],
+ "data": [
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955,
+ -51.0936194154457,
+ -6.5397018645619625,
+ 73.81338015899149,
+ 88.46114630531724,
+ -5.294266751122791,
+ -79.20668057325759,
+ -41.70176598864654,
+ 73.81338015899149,
+ 88.46114630531724,
+ -84.939998758247,
+ -61.488942502520906,
+ -98.33874402761955
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [3, 0],
+ "keepDimensions": true,
+ "selectLastIndex": false
+ },
+ "expected": {
+ "name": "output",
+ "shape": [1, 1, 4, 1],
+ "data": [
+ 2,
+ 0,
+ 2,
+ 1
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 0D scalar options.axes=[]",
+ "inputs": {
+ "input": {
+ "shape": [],
+ "data": [
+ -51.0936194154457
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": []
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 0
+ ],
+ "type": "int64"
+ }
+ },
+ {
+ "name": "argMax float32 0D scalar options.axes=[] no effect by both keepDimensions and selectLastIndex being true",
+ "inputs": {
+ "input": {
+ "shape": [],
+ "data": [
+ -51.0936194154457
+ ],
+ "type": "float32"
+ }
+ },
+ "options": {
+ "axes": [],
+ "keepDimensions": true,
+ "selectLastIndex": true
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ 0
+ ],
+ "type": "int64"
+ }
+ }
+ ]
+} \ No newline at end of file