AlexHung29629
commited on
Commit
•
154d390
1
Parent(s):
99423c9
Update audio_processing_mllama.py
Browse files
audio_processing_mllama.py
CHANGED
@@ -29,7 +29,7 @@ def get_num_embeddings(wav_length: int) -> int:
|
|
29 |
curr_len = wav_length
|
30 |
for i in range(num_feat_extract_layers):
|
31 |
curr_len = calculate_output_length(curr_len, conv_kernel[i], stride=conv_stride[i])
|
32 |
-
curr_len = calculate_output_length(curr_len, adapter_kernel_size, stride=adapter_stride, padding=
|
33 |
return curr_len + 2 # 2 = <|begin_of_audio|>, <|end_of_audio|>
|
34 |
|
35 |
class MllamaAudioFeatureExtractor(Wav2Vec2FeatureExtractor):
|
|
|
29 |
curr_len = wav_length
|
30 |
for i in range(num_feat_extract_layers):
|
31 |
curr_len = calculate_output_length(curr_len, conv_kernel[i], stride=conv_stride[i])
|
32 |
+
curr_len = calculate_output_length(curr_len, adapter_kernel_size, stride=adapter_stride, padding=adapter_stride//2)
|
33 |
return curr_len + 2 # 2 = <|begin_of_audio|>, <|end_of_audio|>
|
34 |
|
35 |
class MllamaAudioFeatureExtractor(Wav2Vec2FeatureExtractor):
|