summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/resources/test_data/relu.json
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/relu.json')
-rw-r--r--testing/web-platform/tests/webnn/resources/test_data/relu.json401
1 files changed, 401 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/relu.json b/testing/web-platform/tests/webnn/resources/test_data/relu.json
new file mode 100644
index 0000000000..248902c665
--- /dev/null
+++ b/testing/web-platform/tests/webnn/resources/test_data/relu.json
@@ -0,0 +1,401 @@
+{
+ "tests": [ // relu input tensor of 1D to 5D with same data values
+ {
+ "name": "relu float32 1D constant tensor",
+ "inputs": {
+ "x": {
+ "shape": [24],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32",
+ "constant": true
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "relu float32 1D tensor",
+ "inputs": {
+ "x": {
+ "shape": [24],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [24],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "relu float32 2D tensor",
+ "inputs": {
+ "x": {
+ "shape": [4, 6],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [4, 6],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "relu float32 3D tensor",
+ "inputs": {
+ "x": {
+ "shape": [2, 3, 4],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 3, 4],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "relu float32 4D tensor",
+ "inputs": {
+ "x": {
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 2, 2, 3],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ },
+ {
+ "name": "relu float32 5D tensor",
+ "inputs": {
+ "x": {
+ "shape": [2, 1, 4, 1, 3],
+ "data": [
+ 79.04725231657116,
+ 2.2503608756501166,
+ 80.73939090529203,
+ 63.90392076789547,
+ 77.67340745512104,
+ -71.09157819044825,
+ -82.74703468427575,
+ -26.814426600801028,
+ -99.16788836397058,
+ -35.71083406288831,
+ 18.36165830990626,
+ -37.36091648205435,
+ -52.8386119809162,
+ -10.408374773008958,
+ 60.60291560236189,
+ -13.644198913810342,
+ -76.54250291031946,
+ -8.132338049258351,
+ 51.51447452437017,
+ -51.63370281825297,
+ -64.567999424324,
+ -5.093302411117136,
+ 15.354103550744384,
+ 90.03858807393516
+ ],
+ "type": "float32"
+ }
+ },
+ "expected": {
+ "name": "output",
+ "shape": [2, 1, 4, 1, 3],
+ "data": [
+ 79.04724884033203,
+ 2.2503609657287598,
+ 80.73938751220703,
+ 63.9039192199707,
+ 77.67340850830078,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 18.361658096313477,
+ 0,
+ 0,
+ 0,
+ 60.6029167175293,
+ 0,
+ 0,
+ 0,
+ 51.51447296142578,
+ 0,
+ 0,
+ 0,
+ 15.354103088378906,
+ 90.03858947753906
+ ],
+ "type": "float32"
+ }
+ }
+ ]
+} \ No newline at end of file