diff options
Diffstat (limited to 'testing/web-platform/tests/webnn/resources/test_data/tanh.json')
-rw-r--r-- | testing/web-platform/tests/webnn/resources/test_data/tanh.json | 401 |
1 files changed, 401 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webnn/resources/test_data/tanh.json b/testing/web-platform/tests/webnn/resources/test_data/tanh.json new file mode 100644 index 0000000000..063c10623d --- /dev/null +++ b/testing/web-platform/tests/webnn/resources/test_data/tanh.json @@ -0,0 +1,401 @@ +{ + "tests": [ + { + "name": "tanh float32 1D constant tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32", + "constant": true + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { + "name": "tanh float32 1D tensor", + "inputs": { + "x": { + "shape": [24], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [24], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { + "name": "tanh float32 2D tensor", + "inputs": { + "x": { + "shape": [4, 6], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [4, 6], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { + "name": "tanh float32 3D tensor", + "inputs": { + "x": { + "shape": [2, 3, 4], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 3, 4], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { + "name": "tanh float32 4D tensor", + "inputs": { + "x": { + "shape": [2, 2, 2, 3], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 2, 2, 3], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + }, + { + "name": "tanh float32 5D tensor", + "inputs": { + "x": { + "shape": [2, 1, 4, 1, 3], + "data": [ + 5.47352732138576, + -1.1535596038683664, + 0.4074455820170506, + 1.8297704953674545, + 2.8690003001236537, + -4.570195171586943, + 4.146744465978713, + -4.0659342722666105, + -3.712847102459686, + 0.9077175268859179, + -0.11083049583219662, + 5.955096345162751, + 1.7831856867406417, + 4.023128342782897, + 5.587857512324163, + -5.280654174784587, + 1.4147950164785632, + -5.707717050109768, + -1.4439182665473629, + -1.9129082844854288, + 2.7495969049667437, + -0.7420240173058836, + 4.856568111647942, + -0.7563357776241926 + ], + "type": "float32" + } + }, + "expected": { + "name": "output", + "shape": [2, 1, 4, 1, 3], + "data": [ + 0.9999647736549377, + -0.8189298510551453, + 0.38630160689353943, + 0.9498035907745361, + 0.9935782551765442, + -0.9997855424880981, + 0.9994998574256897, + -0.9994121193885803, + -0.9988092184066772, + 0.7200349569320679, + -0.1103789210319519, + 0.9999865293502808, + 0.945036768913269, + 0.9993596076965332, + 0.9999719858169556, + -0.9999482035636902, + 0.8885080814361572, + -0.9999779462814331, + -0.894483745098114, + -0.9573289752006531, + 0.9918531775474548, + -0.6303664445877075, + 0.9998790621757507, + -0.6389135718345642 + ], + "type": "float32" + } + } + ] +}
\ No newline at end of file |