| { |
| "tests": [ |
| { |
| "name": "reduceSumSquare float32 1D tensor all positive default options", // default options: {axes: null, keepDimensions: false} |
| "inputs": { |
| "input": { |
| "shape": [24], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 1D tensor all negative default options", |
| "inputs": { |
| "input": { |
| "shape": [24], |
| "data": [ |
| -21.452013864072896, |
| -57.30725907408611, |
| -72.83901116638569, |
| -0.059761520988928396, |
| -71.73678939977705, |
| -44.61909261218302, |
| -43.120022676836946, |
| -91.33738230600645, |
| -33.172438449832086, |
| -48.55593151678299, |
| -95.62864137865712, |
| -20.876631045259614, |
| -16.69083735987158, |
| -39.52110386011864, |
| -7.51078560359592, |
| -90.59026921164444, |
| -42.21683259824742, |
| -76.74274815005997, |
| -98.2242026863753, |
| -60.27295167122231, |
| -74.7320278737084, |
| -8.543684369072977, |
| -59.88873484887647, |
| -17.99894136421551 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 80052.015625, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 1D tensor all positive integers default options", // test with float32 values which are equivalent to integers |
| "inputs": { |
| "input": { |
| "shape": [24], |
| "data": [ |
| 52, |
| 48, |
| 2, |
| 66, |
| 30, |
| 39, |
| 14, |
| 23, |
| 81, |
| 94, |
| 78, |
| 64, |
| 38, |
| 16, |
| 63, |
| 11, |
| 46, |
| 95, |
| 17, |
| 47, |
| 40, |
| 53, |
| 87, |
| 43 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 71347, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 1D tensor all negative integers default options", // test with float32 values which are equivalent to integers |
| "inputs": { |
| "input": { |
| "shape": [24], |
| "data": [ |
| -10, |
| -60, |
| -69, |
| -88, |
| -35, |
| -84, |
| -74, |
| -42, |
| -93, |
| -26, |
| -40, |
| -55, |
| -92, |
| -26, |
| -39, |
| -30, |
| -61, |
| -16, |
| -16, |
| -36, |
| -9, |
| -89, |
| -45, |
| -29 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73634, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 2D tensor default options", |
| "inputs": { |
| "input": { |
| "shape": [4, 6], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 3D tensor default options", |
| "inputs": { |
| "input": { |
| "shape": [2, 3, 4], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor default options", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 5D tensor default options", |
| "inputs": { |
| "input": { |
| "shape": [2, 1, 4, 1, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 3D tensor options.axes", |
| "inputs": { |
| "input": { |
| "shape": [2, 3, 4], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "axes": [2] |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [2, 3], |
| "data": [ |
| 9709.013671875, |
| 10817.7685546875, |
| 14548.470703125, |
| 16385.8515625, |
| 9287.357421875, |
| 12527.3974609375 |
| ], |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor options.axes", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "axes": [0, 2] |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [2, 3], |
| "data": [ |
| 8585.87109375, |
| 7700.654296875, |
| 19889.1796875, |
| 7113.0439453125, |
| 16775.708984375, |
| 13211.3994140625 |
| ], |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 3D tensor options.keepDimensions=false", |
| "inputs": { |
| "input": { |
| "shape": [2, 3, 4], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "keepDimensions": false |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 3D tensor options.keepDimensions=true", |
| "inputs": { |
| "input": { |
| "shape": [2, 3, 4], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "keepDimensions": true |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [1, 1, 1], |
| "data": [ |
| 73275.859375 |
| ], |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor options.keepDimensions=false", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "keepDimensions": false |
| }, |
| "expected": { |
| "name": "output", |
| "data": 73275.859375, |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor options.keepDimensions=true", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "keepDimensions": true |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [1, 1, 1, 1], |
| "data": [ |
| 73275.859375 |
| ], |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=false", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "axes": [1, 3] |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [2, 2], |
| "data": [ |
| 12302.474609375, |
| 22772.77734375, |
| 26919.09765625, |
| 11281.5068359375 |
| ], |
| "type": "float32" |
| } |
| }, |
| { |
| "name": "reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=true", |
| "inputs": { |
| "input": { |
| "shape": [2, 2, 2, 3], |
| "data": [ |
| 52.5615351837915, |
| 2.6261063680439234, |
| 82.04877759500097, |
| 14.401411284784604, |
| 33.96051675758925, |
| 83.93837980977771, |
| 47.44504659398938, |
| 19.177289239472593, |
| 13.493006439137023, |
| 44.15238362662202, |
| 86.53118079678906, |
| 70.20919468463771, |
| 25.67262870756528, |
| 79.73770192548034, |
| 66.42284577584445, |
| 70.40363336301188, |
| 13.503327808732468, |
| 41.22539754662389, |
| 6.654552839238637, |
| 85.79743668166222, |
| 89.91348950671976, |
| 53.55647451130674, |
| 39.48537158474081, |
| 3.9460408540454184 |
| ], |
| "type": "float32" |
| } |
| }, |
| "options": { |
| "axes": [1, 3] |
| }, |
| "expected": { |
| "name": "output", |
| "shape": [1, 2, 2, 1], |
| "data": [ |
| 12302.474609375, |
| 22772.77734375, |
| 26919.09765625, |
| 11281.5068359375 |
| ], |
| "type": "float32" |
| } |
| } |
| ] |
| } |