mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-30 17:52:35 +06:00
distilbert tests
This commit is contained in:
parent
5c00e344c1
commit
cbb368ca06
@ -96,9 +96,7 @@ class CommonTestCases:
|
||||
|
||||
# Make sure we don't have nans
|
||||
out_1 = after_outputs[0].cpu().numpy()
|
||||
out_2 = outputs[0].cpu().numpy()
|
||||
out_1 = out_1[~np.isnan(out_1)]
|
||||
out_2 = out_2[~np.isnan(out_2)]
|
||||
out_1[np.isnan(out_1)] = 0
|
||||
max_diff = np.amax(np.abs(out_1 - out_2))
|
||||
self.assertLessEqual(max_diff, 1e-5)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user