diff options
Diffstat (limited to '')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum_exp.json | 743 |
1 files changed, 743 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum_exp.json b/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum_exp.json new file mode 100644 index 0000000000..b7f39abd52 --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/reduce_log_sum_exp.json @@ -0,0 +1,743 @@ +{ + "tests": [ + { + "name": "reduceLogSumExp float32 1D constant tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} + "inputs": { + "input": { + "shape": [24], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 1D tensor all negative default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -4.025670276125137, + -9.44434807349057, + -3.1193981742372, + -5.943697868896303, + -0.37018045102283637, + -4.3971262954406605, + -6.6059682563332744, + -5.534277354031625, + -7.361471172291552, + -1.9987547534811796, + -9.093968158437377, + -8.693618799659165, + -8.416788434713155, + -1.010741070662755, + -9.814584506221344, + -9.725259665431539, + -9.157071010493805, + -0.0016988189527857855, + -9.963414768875285, + -5.991659641614526, + -6.180599892028498, + -1.2336505614624649, + -0.44234340543470196, + -6.990072309054243 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 1.1666961908340454, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 1D tensor all positive integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + 1, + 5, + 7, + 5, + 7, + 5, + 4, + 2, + 1, + 5, + 8, + 2, + 4, + 1, + 4, + 5, + 4, + 8, + 6, + 2, + 7, + 7, + 8, + 5 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 9.607237815856934, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 1D tensor all negative integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + -6, + -3, + -5, + -1, + -9, + -5, + -1, + -2, + -10, + -1, + -5, + -7, + -7, + -3, + -10, + -10, + -8, + -6, + -2, + -6, + -1, + -9, + -5, + -2 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 0.7001367211341858, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 8.55212688446045, + 3.985233783721924, + 5.52872896194458, + 9.081488609313965, + 6.996237754821777, + 9.759706497192383 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "name": "output", + "shape": [2, 3], + "data": [ + 4.66951847076416, + 9.08117961883545, + 8.533217430114746, + 9.270560264587402, + 6.450263977050781, + 8.917200088500977 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1], + "data": [ + 10.39477825164795 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "name": "output", + "data": 10.39477825164795, + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "name": "output", + "shape": [1, 1, 1, 1], + "data": [ + 10.39477825164795 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [2, 2], + "data": [ + 8.563796997070312, + 5.500619411468506, + 9.753945350646973, + 9.20864486694336 + ], + "type": "float32" + } + }, + { + "name": "reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7974132976078829, + 5.046889970229296, + 8.520371090961714, + 1.4063042363728728, + 0.11882661415275164, + 0.285854490277071, + 1.9325640291685864, + 3.7939957856803797, + 2.6040233063490925, + 4.937509735746763, + 4.571482286709769, + 0.7865120436262685, + 0.21018670996660216, + 9.063042370844672, + 4.099809553408898, + 4.596248815627706, + 0.2549232349678032, + 1.1594801326588255, + 6.802876838759606, + 5.23432518570901, + 8.914905562420849, + 9.166799240859705, + 5.71750713886038, + 0.3255050658627967 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "name": "output", + "shape": [1, 2, 2, 1], + "data": [ + 8.563796997070312, + 5.500619411468506, + 9.753945350646973, + 9.20864486694336 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file |