From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../webnn/resources/test_data/hard_swish.json | 401 +++++++++++++++++++++ 1 file changed, 401 insertions(+) create mode 100644 testing/web-platform/tests/webnn/resources/test_data/hard_swish.json (limited to 'testing/web-platform/tests/webnn/resources/test_data/hard_swish.json') diff --git a/testing/web-platform/tests/webnn/resources/test_data/hard_swish.json b/testing/web-platform/tests/webnn/resources/test_data/hard_swish.json new file mode 100644 index 0000000000..e43f62ede0 --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/hard_swish.json @@ -0,0 +1,401 @@ +{ + "tests": [ + { + "name": "hardSwish float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { + "name": "hardSwish float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { + "name": "hardSwish float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { + "name": "hardSwish float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { + "name": "hardSwish float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + }, + { + "name": "hardSwish float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 0.7341583533045579, + 9.118859151005996, + 3.545238531520827, + 2.621943879280181, + -6.445507690595167, + -1.6835596550754381, + 5.523179785756591, + -5.958856051028132, + -9.169189933081544, + 6.420943542920213, + -3.293031330275471, + 1.0410166785810624, + -7.246322671816956, + -0.9472730969847909, + -5.778352255817807, + 3.185229125228698, + -7.261818072290236, + 4.174602615173795, + 3.7802628241590686, + -6.07124038718255, + -9.909919471919547, + -7.744259390113584, + -8.286120816748381, + 8.083491160956697 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 0.4569105803966522, + 9.11885929107666, + 3.545238494873047, + 2.4567370414733887, + 0, + -0.3693843185901642, + 5.52318000793457, + 0, + 0, + 6.420943737030029, + 0, + 0.7011276483535767, + 0, + -0.3240821659564972, + 0, + 3.1852290630340576, + 0, + 4.174602508544922, + 3.7802627086639404, + 0, + 0, + 0, + 0, + 8.083491325378418 + ], + "type": "float32" + } + } + ] +} \ No newline at end of file -- cgit v1.2.3