Commit ·
ee4b339
1
Parent(s): 46ae83f
Update README.md
Browse files
README.md
CHANGED
|
@@ -36,9 +36,13 @@ inputs = feature_extractor(
|
|
| 36 |
audio_arrays, # List of waveforms in numpy array format
|
| 37 |
sampling_rate=feature_extractor.sampling_rate,
|
| 38 |
max_length=int(feature_extractor.sampling_rate * max_duration),
|
| 39 |
-
padding=
|
| 40 |
truncation=True,
|
| 41 |
return_tensors='pt'
|
| 42 |
)
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
|
|
|
| 36 |
audio_arrays, # List of waveforms in numpy array format
|
| 37 |
sampling_rate=feature_extractor.sampling_rate,
|
| 38 |
max_length=int(feature_extractor.sampling_rate * max_duration),
|
| 39 |
+
padding='max_length',
|
| 40 |
truncation=True,
|
| 41 |
return_tensors='pt'
|
| 42 |
)
|
| 43 |
+
# The shape of `input_values` is (batch_size, sample_rate * max_duration)
|
| 44 |
+
= inputs['input_values']
|
| 45 |
+
outputs = mert(**inputs)
|
| 46 |
+
# The shape of `logits` is (batch_size, num_classes)
|
| 47 |
+
logits = outputs['logits']
|
| 48 |
```
|