fdschmidt93
commited on
Commit
•
ccaa121
1
Parent(s):
1057217
chore: remove already inherited method
Browse files
modeling_seamless_m4t_v2_speech_encoder.py
CHANGED
@@ -24,14 +24,6 @@ class SeamlessM4Tv2SpeechEncoder(SeamlessM4Tv2SpeechEncoder):
|
|
24 |
def __init__(self, *args, **kwargs):
|
25 |
super().__init__(*args, **kwargs)
|
26 |
|
27 |
-
def _compute_sub_sample_lengths_from_attention_mask(self, attention_mask):
|
28 |
-
pad = self.kernel_size // 2
|
29 |
-
seq_lens = attention_mask.size(1) - (1 - attention_mask.int()).sum(1)
|
30 |
-
|
31 |
-
seq_lens = ((seq_lens + 2 * pad - self.kernel_size) / self.stride) + 1
|
32 |
-
|
33 |
-
return seq_lens.floor()
|
34 |
-
|
35 |
@staticmethod
|
36 |
def mean_pooling(
|
37 |
hidden_states: torch.Tensor, attention_mask: torch.Tensor
|
|
|
24 |
def __init__(self, *args, **kwargs):
|
25 |
super().__init__(*args, **kwargs)
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
@staticmethod
|
28 |
def mean_pooling(
|
29 |
hidden_states: torch.Tensor, attention_mask: torch.Tensor
|