bepierre / SpeechVGG

Feature extractor for DL speech processing.
GNU General Public License v3.0
65 stars 13 forks source link

Quesiton about DataGenerator #7

Open Connor008 opened 1 year ago

Connor008 commented 1 year ago

Dear Pierre,

Thank you very much for sharing your codes and datasets online.

I am trying to use your code with my datasets, but I found the line data_tmp= np.delete(data_tmp, (128), axis=1) in this link doesn't work.

The errors says the following:


IndexError Traceback (most recent call last)

in ----> 1 print(train_generator[1]) ~/Dropbox/NETSPAR-Speech/Program Jupyter 2022Nov/data_generator_new.py in __getitem__(self, index) 99 100 # Generate data --> 101 specs, labels = self.__data_generation(list_IDs_temp) 102 103 return specs, labels ~/Dropbox/NETSPAR-Speech/Program Jupyter 2022Nov/data_generator_new.py in __data_generation(self, list_IDs_temp) 144 145 #Store Labels --> 146 data_tmp= np.delete(data_tmp, (128), axis=1) #already deleted in a previous step 147 data[i,] = data_tmp 148 <__array_function__ internals> in delete(*args, **kwargs) ~/.local/lib/python3.8/site-packages/numpy/lib/function_base.py in delete(arr, obj, axis) 4371 obj = obj.item() 4372 if (obj < -N or obj >= N): -> 4373 raise IndexError( 4374 "index %i is out of bounds for axis %i with " 4375 "size %i" % (obj, axis, N)) IndexError: index 128 is out of bounds for axis 1 with size 128 Do you have an idea what might be the problem? Thanks a lot in advance and have a great day!