diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/reduce_mean.json')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/reduce_mean.json | 735 |
1 files changed, 735 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/reduce_mean.json b/testing/web-platform/tests/webnn/resources/test_data/reduce_mean.json new file mode 100644 index 0000000000..5a48952c06 --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/reduce_mean.json @@ -0,0 +1,735 @@ +{ + "tests": [ + { + "name": "reduceMean float32 1D constant tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all positive default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all negative default options", + "inputs": { + "input": { + "shape": [24], + "data": [ + -37.14687069315612, + -44.50042209159177, + -6.126548413219496, + -6.321792976064302, + -76.5389783512652, + -4.137693032746782, + -20.763563935321017, + -38.74917461116718, + -36.81039848179957, + -26.274377028592966, + -12.56681966278282, + -55.28200785289164, + -20.697565065775606, + -34.19586340660584, + -45.36002983401583, + -34.996193368480235, + -67.84308553425207, + -0.7434244205683882, + -21.981258134364538, + -61.31269509631454, + -58.59896180690518, + -76.02979877636918, + -23.917405754606236, + -22.941872716763513 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -34.74319839477539, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all positive integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + 42, + 24, + 44, + 38, + 82, + 93, + 64, + 40, + 48, + 78, + 81, + 59, + 45, + 18, + 3, + 77, + 60, + 19, + 66, + 8, + 21, + 19, + 62, + 71 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 48.41666793823242, + "type": "float32" + } + }, + { + "name": "reduceMean float32 1D tensor all negative integers default options", // test with float32 values which are equivalent to integers + "inputs": { + "input": { + "shape": [24], + "data": [ + -73, + -8, + -55, + -73, + -61, + -54, + -5, + -39, + -66, + -53, + -57, + -39, + -62, + -98, + -36, + -1, + -75, + -8, + -71, + -72, + -67, + -16, + -21, + -31 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": -47.54166793823242, + "type": "float32" + } + }, + { + "name": "reduceMean float32 2D tensor default options", + "inputs": { + "input": { + "shape": [4, 6], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor default options", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor default options", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 5D tensor default options", + "inputs": { + "input": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 45.46687316894531, + 49.670711517333984, + 50.94768142700195, + 44.734745025634766, + 27.777833938598633, + 23.264999389648438 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [0, 2] + }, + "expected": { + "shape": [2, 3], + "data": [ + 54.82453536987305, + 40.251548767089844, + 22.060470581054688, + 48.58541488647461, + 51.343353271484375, + 24.797523498535156 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 3D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 3, 4], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1], + "data": [ + 40.31047439575195 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": false + }, + "expected": { + "data": 40.31047439575195, + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "keepDimensions": true + }, + "expected": { + "shape": [1, 1, 1, 1], + "data": [ + 40.31047439575195 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes with options.keepDimensions=false", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [2, 2], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + }, + { + "name": "reduceMean float32 4D tensor options.axes with options.keepDimensions=true", + "inputs": { + "input": { + "shape": [2, 2, 2, 3], + "data": [ + 95.84498772347054, + 75.69370054099012, + 1.5417720846181426, + 8.787033906673592, + 70.08280339173061, + 13.784331379836544, + 20.006068194857885, + 94.80963809344851, + 25.829190184293417, + 94.13260521032214, + 67.72958187044576, + 16.099351117563778, + 92.19433555001908, + 11.567352371276595, + 52.705496151946285, + 22.471793133903972, + 3.6623324286590764, + 20.2102781903039, + 58.56523137489753, + 28.673493080608758, + 42.134198143189195, + 21.637750690378144, + 14.160698325191756, + 15.127351396412191 + ], + "type": "float32" + } + }, + "options": { + "axes": [1, 3] + }, + "expected": { + "shape": [1, 2, 2, 1], + "data": [ + 52.287559509277344, + 45.10261917114258, + 47.640018463134766, + 16.211700439453125 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file |