Created
March 15, 2021 05:39
-
-
Save AyishaR/0abb4d60d977bc8ef432ea9d0af444e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total_len = input_labels.shape[0] | |
#Shuffling inputs and labels | |
shuffle_permutation = np.arange(total_len) | |
np.random.shuffle(shuffle_permutation) | |
input_spectrogram = input_spectrogram[shuffle_permutation] | |
input_labels = input_labels[shuffle_permutation] | |
#Splitting into train and test dataset - 90-10 ratio | |
train_split = 0.9 | |
cutoff = int(train_split*total_len) | |
inputs_train = input_spectrogram[:cutoff] | |
inputs_test = input_spectrogram[cutoff:] | |
labels_train = input_labels[:cutoff] | |
labels_test = input_labels[cutoff:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment