From 6d3d49f76746ab94795b93c73cd9f5451cc6fe23 Mon Sep 17 00:00:00 2001 From: Afonja Tejumade Date: Wed, 28 Apr 2021 09:54:42 +0200 Subject: [PATCH] fix pickle error when loading class_dict_file numpy.save has the allow_pickle=True as default while numpy.load has allow_pickle=False, so this raises an error that can be fixed by explicitly setting the allow_pickle variable. --- speaker_id.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speaker_id.py b/speaker_id.py index 36adc9d2..e030175a 100644 --- a/speaker_id.py +++ b/speaker_id.py @@ -170,7 +170,7 @@ def create_batches_rnd(batch_size,data_folder,wav_lst,N_snt,wlen,lab_dict,fact_a CNN_net.cuda() # Loading label dictionary -lab_dict=np.load(class_dict_file).item() +lab_dict=np.load(class_dict_file, allow_pickle=True).item()