Closed DAKSHSEMWAL closed 1 year ago
The indices in this line: signal = signal[(n_sample-n_sample_fit)/2:(n_sample+n_sample_fit)/2] might be computed as float. Ensure they are int maybe by: signal[int((n_sample-n_sample_fit)/2):int((n_sample+n_sample_fit)/2)]
on running crnn.py iam getting this error I:\Coding\crnn-music-genre-classification-master\src>python crnn.py C:\Users\dsemw\AppData\Local\Programs\Python\Python36\lib\site-packages\h5py__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from
X_test = rd.get_melspectrograms_indexed(test_indices)
File "I:\Coding\crnn-music-genre-classification-master\src\read_data.py", line 25, in get_melspectrograms_indexed
spectrograms = np.asarray([dp.log_scale_melspectrogram(i) for i in labels_dense['path'][index]])
File "I:\Coding\crnn-music-genre-classification-master\src\read_data.py", line 25, in
spectrograms = np.asarray([dp.log_scale_melspectrogram(i) for i in labels_dense['path'][index]])
File "I:\Coding\crnn-music-genre-classification-master\src\data_preprocess.py", line 21, in log_scale_melspectrogram
signal = signal[(n_sample-n_sample_fit)/2:(n_sample+n_sample_fit)/2]
TypeError: slice indices must be integers or None or have an index method
float
tonp.floating
is deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type
. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "crnn.py", line 94, in