Spaces:
Sleeping
Sleeping
update
Browse files
examples/vm_sound_classification/step_3_train_model.py
CHANGED
@@ -161,7 +161,10 @@ def main():
|
|
161 |
# num_labels=vocabulary.get_vocab_size(namespace="labels")
|
162 |
)
|
163 |
if not config.cls_head_param["num_labels"] == vocabulary.get_vocab_size(namespace="labels"):
|
164 |
-
raise AssertionError
|
|
|
|
|
|
|
165 |
model = WaveClassifierPretrainedModel(
|
166 |
config=config,
|
167 |
)
|
|
|
161 |
# num_labels=vocabulary.get_vocab_size(namespace="labels")
|
162 |
)
|
163 |
if not config.cls_head_param["num_labels"] == vocabulary.get_vocab_size(namespace="labels"):
|
164 |
+
raise AssertionError("expected num labels: {} instead of {}.".format(
|
165 |
+
vocabulary.get_vocab_size(namespace="labels"),
|
166 |
+
config.cls_head_param["num_labels"],
|
167 |
+
))
|
168 |
model = WaveClassifierPretrainedModel(
|
169 |
config=config,
|
170 |
)
|