victor369basu/Respiratory-diseases-recognition-through-respiratory-sound-with-the-help-of-deep-neural-network

input shape for GRU model

Cybernorse opened this issue · 3 comments

Good day Victor, i was reproducing this deep neural network with GRU code as i followed your research methodology for classifying respiratory diseases based on audio samples (ICBHI), since you did not provide the code for reshaping the dataset to the required input shape format (which is - None, 1, 40) i am having trouble reshaping the dataset for input as i have tried different ways.
Could you please share that code or provide any guidance on how i can do that ? Thank you very much.

data_x, sampling_rate = librosa.load(dir_+soundDir,res_type='kaiser_fast')
mfccs = np.mean(librosa.feature.mfcc(y=data_x, sr=sampling_rate, n_mfcc=40).T,axis=0)

A lot of things in Keras has changed since 2019. Now it's tf.keras( tensorflow ) not Keras as a library. you need to change a lot in this code wrt to the current tensorflow keras, although the architecture and pipeline remain the same.

data_x, sampling_rate = librosa.load(dir_+soundDir,res_type='kaiser_fast')
mfccs = np.mean(librosa.feature.mfcc(y=data_x, sr=sampling_rate, n_mfcc=40).T,axis=0)

^^^ i have done that, i have the 40 features for each audio and their respective classes(diseases), what i want to know is how did you input shaped your feature engineered data for GRU deep neural network to (None, 1, 40), did you use keras embedding layer ? or did you just used pandas and numpy for reshaping the input data ? please provide guidance , code would be great
Thank you.