Skip to content

Commit

Permalink
Update expected gradients
Browse files Browse the repository at this point in the history
Signed-off-by: Beat Buesser <beat.buesser@ie.ibm.com>
  • Loading branch information
Beat Buesser committed May 23, 2022
1 parent 5008c4c commit 6e436c3
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 64 deletions.
120 changes: 60 additions & 60 deletions tests/estimators/speech_recognition/test_pytorch_deep_speech.json
Original file line number Diff line number Diff line change
Expand Up @@ -1209,26 +1209,26 @@
59.330414
],
"v3": [
9.67159,
-66.957794,
-44.46585,
7.0059543,
10.927294,
69.390564,
-17.08722,
16.75513,
-8.702984,
-12.894548,
-4.930056,
26.689623,
11.728573,
-13.359777,
-3.3791718,
16.68211,
-1.597374,
-38.245365,
-14.1684885,
-6.1721306
-52.107204,
80.12434,
0.1422075,
-16.747665,
5.482609,
-73.00292,
4.8389072,
-68.28195,
31.532806,
32.751762,
29.901394,
6.7506924,
-8.392263,
-9.66983,
-47.149708,
17.356539,
-21.253674,
30.251003,
45.01815,
24.449715
]
},
"expected_gradients_preprocessor_2": {
Expand All @@ -1255,26 +1255,26 @@
21.173508
],
"v3": [
92.46138,
-93.12033,
-39.663975,
17.074387,
4.7168074,
48.48062,
-35.71494,
44.991158,
-5.0843663,
2.53418,
2.1981678,
31.611801,
-3.1680202,
-36.026978,
1.3138019,
16.24123,
3.036849,
-42.046444,
-24.857136,
-10.367646
-3.0621164,
-24.822927,
4.329992,
23.721256,
22.204624,
-7.0020237,
-14.920893,
11.819107,
-4.6338096,
-21.96893,
-9.85806,
1.978956,
-18.523891,
-10.621268,
32.286957,
27.502445,
-29.073832,
-21.147717,
-10.401826,
-5.8815036
]
},
"expected_gradients_preprocessor_3": {
Expand All @@ -1301,26 +1301,26 @@
106.87009
],
"v3": [
-107.34925,
129.21048,
34.767242,
-17.912651,
-34.07789,
-89.930664,
41.57259,
-53.492615,
39.124886,
43.564465,
15.988552,
-50.70451,
31.945015,
48.31034,
-76.95041,
-33.472504,
47.841934,
96.91744,
41.19999,
-18.601452
-320.31787,
458.37903,
166.74754,
-60.69311,
-110.62456,
-219.13577,
73.11543,
-242.01416,
133.31516,
112.652115,
60.64424,
-216.93463,
92.05547,
89.600334,
-168.58362,
3.0452464,
144.53711,
299.63873,
124.885254,
56.88322
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def test_pytorch_deep_speech_preprocessor(
expected_transcriptions2 = expected_data["expected_transcriptions_preprocessor_2"]
expected_probs = expected_data["expected_probs_preprocessor"][version]
expected_gradients1 = expected_data["expected_gradients_preprocessor_1"][version]
# expected_gradients2 = expected_data["expected_gradients_preprocessor_2"][version]
# expected_gradients3 = expected_data["expected_gradients_preprocessor_3"][version]
expected_gradients2 = expected_data["expected_gradients_preprocessor_2"][version]
expected_gradients3 = expected_data["expected_gradients_preprocessor_3"][version]

# Create signal data
x = np.array([x1 * 100, x1 * 100, x1 * 100], dtype=ART_NUMPY_DTYPE)
Expand Down Expand Up @@ -205,8 +205,8 @@ def test_pytorch_deep_speech_preprocessor(
print(grads[2][:20])

np.testing.assert_array_almost_equal(grads[0][:20], expected_gradients1, decimal=-2)
np.testing.assert_array_almost_equal(grads[1][:20], expected_gradients1, decimal=-2)
np.testing.assert_array_almost_equal(grads[2][:20], expected_gradients1, decimal=-2)
np.testing.assert_array_almost_equal(grads[1][:20], expected_gradients2, decimal=-2)
np.testing.assert_array_almost_equal(grads[2][:20], expected_gradients3, decimal=-2)

# Now test fit function
# Create the optimizer
Expand Down

0 comments on commit 6e436c3

Please sign in to comment.