From 78fb2d2760b85ddfba0fb179f9e181f21a8c1661 Mon Sep 17 00:00:00 2001 From: Eric Bezzam Date: Mon, 21 Jul 2025 13:25:52 +0200 Subject: [PATCH] Fix bad tensor shape in failing Hubert test. (#39502) Fix bad tensor shape in Hubert test. --- tests/models/hubert/test_modeling_hubert.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/models/hubert/test_modeling_hubert.py b/tests/models/hubert/test_modeling_hubert.py index 904a04e1f9..278f0875b7 100644 --- a/tests/models/hubert/test_modeling_hubert.py +++ b/tests/models/hubert/test_modeling_hubert.py @@ -962,19 +962,23 @@ class HubertModelIntegrationTest(unittest.TestCase): # model(wav)['dense'] expected_outputs_first = torch.tensor( [ - [0.0267, 0.1776, -0.1706, -0.4559], - [-0.2430, -0.2943, -0.1864, -0.1187], - [-0.1812, -0.4239, -0.1916, -0.0858], - [-0.1495, -0.4758, -0.4036, 0.0302], + [ + [0.0267, 0.1776, -0.1706, -0.4559], + [-0.2430, -0.2943, -0.1864, -0.1187], + [-0.1812, -0.4239, -0.1916, -0.0858], + [-0.1495, -0.4758, -0.4036, 0.0302], + ] ], device=torch_device, ) expected_outputs_last = torch.tensor( [ - [0.3366, -0.2734, -0.1415, -0.3055], - [0.2329, -0.3580, -0.1421, -0.3197], - [0.1631, -0.4301, -0.1965, -0.2956], - [0.3342, -0.2185, -0.2253, -0.2363], + [ + [0.3366, -0.2734, -0.1415, -0.3055], + [0.2329, -0.3580, -0.1421, -0.3197], + [0.1631, -0.4301, -0.1965, -0.2956], + [0.3342, -0.2185, -0.2253, -0.2363], + ] ], device=torch_device, )