diff --git a/webnn/resources/test_data/arg_max.json b/webnn/resources/test_data/arg_max.json index c66f785f416c73..d65939d0477b7c 100644 --- a/webnn/resources/test_data/arg_max.json +++ b/webnn/resources/test_data/arg_max.json @@ -471,98 +471,6 @@ "type": "int32" } }, - { - "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": "int32" - } - }, - { - "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": "int32" - } - }, { "name": "argMax float32 4D tensor options.axes=[0, 2] options.keepDimensions=false", "inputs": { @@ -663,7 +571,7 @@ } }, { - "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=false", + "name": "argMax float32 4D tensor options.axes=[0, 2]", "inputs": { "input": { "shape": [2, 1, 4, 3], @@ -697,8 +605,7 @@ } }, "options": { - "axes": [0, 2], - "selectLastIndex": false + "axes": [0, 2] }, "expected": { "name": "output", @@ -712,7 +619,7 @@ } }, { - "name": "argMax float32 4D tensor options.axes=[0, 2] options.selectLastIndex=true", + "name": "argMax float32 4D tensor options.axes=[3, 0, 1]", "inputs": { "input": { "shape": [2, 1, 4, 3], @@ -746,57 +653,7 @@ } }, "options": { - "axes": [0, 2], - "selectLastIndex": true - }, - "expected": { - "name": "output", - "shape": [1, 3], - "data": [ - 5, - 6, - 6 - ], - "type": "int32" - } - }, - { - "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 + "axes": [3, 0, 1] }, "expected": { "name": "output", @@ -810,56 +667,6 @@ "type": "int32" } }, - { - "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": "int32" - } - }, { "name": "argMax float32 4D tensor all options", "inputs": { @@ -896,8 +703,7 @@ }, "options": { "axes": [3, 0], - "keepDimensions": true, - "selectLastIndex": false + "keepDimensions": true }, "expected": { "name": "output", @@ -935,7 +741,7 @@ } }, { - "name": "argMax float32 0D scalar options.axes=[] no effect by both keepDimensions and selectLastIndex being true", + "name": "argMax float32 0D scalar options.axes=[] no effect by keepDimensions being true", "inputs": { "input": { "shape": [], @@ -947,8 +753,7 @@ }, "options": { "axes": [], - "keepDimensions": true, - "selectLastIndex": true + "keepDimensions": true }, "expected": { "name": "output", diff --git a/webnn/resources/test_data/arg_min.json b/webnn/resources/test_data/arg_min.json index eaf59f098cc281..f7b3f6d10d6239 100644 --- a/webnn/resources/test_data/arg_min.json +++ b/webnn/resources/test_data/arg_min.json @@ -471,98 +471,6 @@ "type": "int32" } }, - { - "name": "argMin float32 4D tensor options.selectLastIndex=true", - "inputs": { - "input": { - "shape": [2, 1, 4, 3], - "data": [ - 3.830124090690262, - -24.986487937638074, - 5.299982630691289, - -48.5486590218902, - 40.30886781808215, - 60.184293919409726, - -82.78385618759043, - -96.50904103637833, - 71.87028201591897, - 38.866394268784035, - -39.143725517854435, - 31.444366685561903, - -82.78385618759043, - -96.50904103637833, - -25.53388886326502, - -16.142265850469343, - 66.63677406472371, - 82.5119815304117, - -82.78385618759043, - -96.50904103637833, - 39.7687246127592, - 42.15040238450999, - 82.66863662444459, - 85.4526923278379 - ], - "type": "float32" - } - }, - "options": { - "selectLastIndex": true - }, - "expected": { - "name": "output", - "shape": [], - "data": [ - 19 - ], - "type": "int32" - } - }, - { - "name": "argMin float32 4D tensor options.selectLastIndex=false", - "inputs": { - "input": { - "shape": [2, 1, 4, 3], - "data": [ - 3.830124090690262, - -24.986487937638074, - 5.299982630691289, - -48.5486590218902, - 40.30886781808215, - 60.184293919409726, - -82.78385618759043, - -96.50904103637833, - 71.87028201591897, - 38.866394268784035, - -39.143725517854435, - 31.444366685561903, - -82.78385618759043, - -96.50904103637833, - -25.53388886326502, - -16.142265850469343, - 66.63677406472371, - 82.5119815304117, - -82.78385618759043, - -96.50904103637833, - 39.7687246127592, - 42.15040238450999, - 82.66863662444459, - 85.4526923278379 - ], - "type": "float32" - } - }, - "options": { - "selectLastIndex": false - }, - "expected": { - "name": "output", - "shape": [], - "data": [ - 7 - ], - "type": "int32" - } - }, { "name": "argMin float32 4D tensor options.axes=[0, 2] options.keepDimensions=false", "inputs": { @@ -663,7 +571,7 @@ } }, { - "name": "argMin float32 4D tensor options.axes=[0, 2] options.selectLastIndex=false", + "name": "argMin float32 4D tensor options.axes=[0, 2]", "inputs": { "input": { "shape": [2, 1, 4, 3], @@ -697,8 +605,7 @@ } }, "options": { - "axes": [0, 2], - "selectLastIndex": false + "axes": [0, 2] }, "expected": { "name": "output", @@ -712,56 +619,7 @@ } }, { - "name": "argMin float32 4D tensor options.axes=[0, 2] options.selectLastIndex=true", - "inputs": { - "input": { - "shape": [2, 1, 4, 3], - "data": [ - 3.830124090690262, - -24.986487937638074, - 5.299982630691289, - -48.5486590218902, - 40.30886781808215, - 60.184293919409726, - -82.78385618759043, - -96.50904103637833, - 71.87028201591897, - 38.866394268784035, - -39.143725517854435, - 31.444366685561903, - -82.78385618759043, - -96.50904103637833, - -25.53388886326502, - -16.142265850469343, - 66.63677406472371, - 82.5119815304117, - -82.78385618759043, - -96.50904103637833, - 39.7687246127592, - 42.15040238450999, - 82.66863662444459, - 85.4526923278379 - ], - "type": "float32" - } - }, - "options": { - "axes": [0, 2], - "selectLastIndex": true - }, - "expected": { - "name": "output", - "shape": [1, 3], - "data": [ - 6, - 6, - 4 - ], - "type": "int32" - } - }, - { - "name": "argMin float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=false", + "name": "argMin float32 4D tensor options.axes=[3, 0, 1]", "inputs": { "input": { "shape": [2, 1, 4, 3], @@ -795,8 +653,7 @@ } }, "options": { - "axes": [3, 0, 1], - "selectLastIndex": false + "axes": [3, 0, 1] }, "expected": { "name": "output", @@ -810,56 +667,6 @@ "type": "int32" } }, - { - "name": "argMin float32 4D tensor options.axes=[3, 0, 1] options.selectLastIndex=true", - "inputs": { - "input": { - "shape": [2, 1, 4, 3], - "data": [ - 3.830124090690262, - -24.986487937638074, - 5.299982630691289, - -48.5486590218902, - 40.30886781808215, - 60.184293919409726, - -82.78385618759043, - -96.50904103637833, - 71.87028201591897, - 38.866394268784035, - -39.143725517854435, - 31.444366685561903, - -82.78385618759043, - -96.50904103637833, - -25.53388886326502, - -16.142265850469343, - 66.63677406472371, - 82.5119815304117, - -82.78385618759043, - -96.50904103637833, - 39.7687246127592, - 42.15040238450999, - 82.66863662444459, - 85.4526923278379 - ], - "type": "float32" - } - }, - "options": { - "axes": [3, 0, 1], - "selectLastIndex": true - }, - "expected": { - "name": "output", - "shape": [4], - "data": [ - 4, - 0, - 4, - 1 - ], - "type": "int32" - } - }, { "name": "argMin float32 4D tensor all options", "inputs": { @@ -896,8 +703,7 @@ }, "options": { "axes": [3, 0], - "keepDimensions": true, - "selectLastIndex": false + "keepDimensions": true }, "expected": { "name": "output", @@ -935,7 +741,7 @@ } }, { - "name": "argMin float32 0D scalar options.axes=[] no effect by both keepDimensions and selectLastIndex being true", + "name": "argMin float32 0D scalar options.axes=[] no effect by keepDimensions being true", "inputs": { "input": { "shape": [], @@ -947,8 +753,7 @@ }, "options": { "axes": [], - "keepDimensions": true, - "selectLastIndex": true + "keepDimensions": true }, "expected": { "name": "output",