* Update feature_extraction_clap.py

* changed all lenght to length
This commit is contained in:
Susnato Dhar
2023-09-05 13:42:25 +05:30
committed by GitHub
parent d8e13b3e04
commit 404ff8fc17
20 changed files with 35 additions and 35 deletions

View File

@@ -252,8 +252,8 @@ class HubertModelTester:
input_values[i, input_lengths[i] :] = 0.0
if max_length_labels[i] < labels.shape[-1]:
# it's important that we make sure that target lenghts are at least
# one shorter than logit lenghts to prevent -inf
# it's important that we make sure that target lengths are at least
# one shorter than logit lengths to prevent -inf
labels[i, max_length_labels[i] - 1 :] = -100
loss = model(input_values, labels=labels).loss