lezhenin / lstm-sound-classification-2019

7 stars 4 forks source link

could not find the last way #1

Open urbansound8K opened 4 years ago

urbansound8K commented 4 years ago

i tried to run ur code but got this meg at the last stage (Failed to create a directory: ./logs_cv_lstm_mel_p1_norm/lstm_adam_stft_1024_1024_1024_44100_mel_128_pow_1_full_tf2_2019-12-10_15:25; Invalid argument)

can u feedback me,plz?

lezhenin commented 4 years ago

Could you provide lines of code, where this error was raised, and full error message with stack trace?

lezhenin commented 4 years ago

I suppose it is related to TensorBoard callbak. Try to add '/' to the end of path: board = TensorBoard(save_path + btag + '/', write_graph=True, write_grads=True, write_images=True)

urbansound8K commented 4 years ago

i figured it out. thank u.

if I wanna stack Mfcc with mel. what should I do! I have to change the padding frame!! but didnt work out!

how can I do it?

lezhenin commented 4 years ago

Try to define your own callback for load_large_data function, that stacks melspectrum and mfcc into array of shape (2, 128, T). You can fill mfcc with zeros to get the same shape as melspectrum. Then you should modify the rest of code, taking into account that data has three dims. If you have troubles with clipping and padding, try to process each channel separately using existing code.

urbansound8K commented 4 years ago

thank you so much. Im trying to run LSTM. everytime I run it I got messsage that ,y PC is low in memory. Im using RAM with 16.

any adives?

lezhenin commented 4 years ago

Use generators. Load and process files one by one. Existing generators is used just to reshape data, you can modify they.

urbansound8K commented 4 years ago

my point is that I run the code n everyting goes smoothly, but after one or two epochs. I got that meassage. Btw, i did the CNN part n worked out well. this problem is just when I run LSTM.

I didnt get your last point about generators. May u expline it again?

thanks a lot

lezhenin commented 4 years ago

Because you store the whole dataset in RAM, your program just runs out of memory. Generators allow load and process samples from dataset one by one. So you should use fit_generator method on your Keras model and provide it with a generator, which opens .wav file, extracts mel and mfcc and yields it to the model.