Thunfischpirat / SpokenDigits

This is our submission for the final graded project for the WS22/23 course "Neural Networks: Theory and Implementation" at Saarland University.
1 stars 0 forks source link

Regenerate data when num_mels or num_frame is changed. #1

Closed Thunfischpirat closed 1 year ago

Thunfischpirat commented 1 year ago

Function create_features() in model_baseline/mel_spectrogram.py doesn't check whether the parameters num_features or num_mels have been changed when checking whether it should load features and labels from the data folder or generate them.

What might happen: The user changes num_mels or num_frames between two runs, but since features and labels have already been saved in the first run, this change doesn't do anything since create_features() tries to load features and labels by default if they already exist.

Thunfischpirat commented 1 year ago

Since spectrograms are downsampled before saving the corresponding numpy array, the number of columns of the saved array doesn't correspond anymore to the argument num_mels of create_features(). Since fixing this would greatly increase the cognitive complexity of the code, I decided to leave the code as it is. The user can recreate features by setting the argument lazy_mode to False.