Skip to content

Commit

Permalink
fixing undefined task error
Browse files Browse the repository at this point in the history
  • Loading branch information
pakoromilas committed Feb 17, 2022
1 parent 82befe7 commit 7c02804
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deep_audio_features/bin/deep_retrieval_build_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 27,8 @@ def get_meta_features(audio_file, list_of_models, layers_dropped=0, verbose=True
model_params = pickle.load(input_file)
if "classes_mapping" in model_params:
task = "classification"
else:
task = "representation"

r, soft = test_model(modelpath=m,
ifile=audio_file,
Expand All @@ -45,7 47,7 @@ def get_meta_features(audio_file, list_of_models, layers_dropped=0, verbose=True

features = np.concatenate([features, average])
feature_names = [f'{os.path.basename(m).replace(".pt", "")}_{i}'
for i in range(len(soft_average))]
for i in range(len(average))]

# keep whole temporal posterior sequences as well
features_temporal.append(model_features)
Expand Down

0 comments on commit 7c02804

Please sign in to comment.