summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/resources/test_data/identity.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/identity.json')
-rw-r--r--testing/web-platform/tests/webnn/resources/test_data/identity.json422
1 files changed, 422 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/identity.json b/testing/web-platform/tests/webnn/resources/test_data/identity.json
new file mode 100644
index 0000000000..6024e8786f
--- /dev/null
+++ b/testing/web-platform/tests/webnn/resources/test_data/identity.json
@@ -0,0 +1,422 @@
+{
+ "tests": [
+ {
+ "name": "identity float32 0D scalar",
+ "inputs": {
+ "input": {
+ "shape": [],
+ "data": [
+ -4.273642352495437
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [],
+ "data": [
+ -4.273642539978027
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "identity float32 1D constant tensor",
+ "inputs": {
+ "input": {
+ "shape":[24],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ {
+ "name": "identity float32 1D tensor",
+ "inputs": {
+ "input": {
+ "shape":[24],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "identity float32 2D tensor",
+ "inputs": {
+ "input": {
+ "shape":[4, 6],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [4, 6],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "identity float32 3D tensor",
+ "inputs": {
+ "input": {
+ "shape":[2, 3, 4],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 3, 4],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "identity float32 4D tensor",
+ "inputs": {
+ "input": {
+ "shape":[2, 2, 2, 3],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "identity float32 5D tensor",
+ "inputs": {
+ "input": {
+ "shape":[2, 1, 4, 1, 3],
+ "data": [
+ 0.3775514170243319,
+ -0.8890897684684553,
+ 9.965806154214683,
+ 7.964576323402355,
+ -4.207889285235442,
+ -3.748703004469509,
+ -2.5114005246358584,
+ 5.777673182705456,
+ -4.472823584733945,
+ -8.405767426137253,
+ -3.857972358579822,
+ 6.0361876313443865,
+ 9.076417609486516,
+ 7.101912233390028,
+ 1.4166420410053604,
+ -5.644308337756456,
+ -2.598648114422626,
+ -7.264847061642685,
+ -9.782458548766716,
+ 5.4966995825042275,
+ -9.967339588615012,
+ -6.901016518448189,
+ -2.850190435789366,
+ 3.279616439989832
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 1, 4, 1, 3],
+ "data": [
+ 0.377551406621933,
+ -0.8890897631645203,
+ 9.965806007385254,
+ 7.964576244354248,
+ -4.207889080047607,
+ -3.7487030029296875,
+ -2.5114004611968994,
+ 5.777673244476318,
+ -4.472823619842529,
+ -8.405767440795898,
+ -3.8579723834991455,
+ 6.036187648773193,
+ 9.076417922973633,
+ 7.101912021636963,
+ 1.4166420698165894,
+ -5.644308567047119,
+ -2.5986480712890625,
+ -7.264847278594971,
+ -9.782458305358887,
+ 5.496699810028076,
+ -9.967339515686035,
+ -6.901016712188721,
+ -2.8501904010772705,
+ 3.279616355895996
+ ],
+ "type": "float32"
+ }
+ }
+ ]
+} \ No newline at end of file