text_plain_output_1.png
from keras.callbacks import History, EarlyStopping

from tensorflow.python.client import device_lib

import os
from time import perf_counter
import numpy as np
import soundfile as sf
from collections import Counter
import matplotlib.pyplot as plt
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
import tensorflow as tf
import keras
from keras.layers import Conv1D, BatchNormalization, Dense, Flatten, Activation, Dropout
from tensorflow.keras.layers.experimental import preprocessing
from keras.models import Sequential
from keras.callbacks import History, EarlyStopping
history = History()
generator_init = False
model_saved = False
checkpoint_saved = False
SAVED_MODEL_PATH = './'
MODEL_NAME = SAVED_MODEL_PATH + 'langid_model'
CHECKPOINT_FILEPATH = MODEL_NAME + '_CP'
USE_OVERFITTING_ORIGINAL_NW = 1
USE_DROPOUT_NO_REGULARIZATION_NW = 2
USE_DROPOUT_REGULARIZATION_NW = 3
nn_choice = USE_DROPOUT_REGULARIZATION_NW
WAVELET = 'bior6.8'
train_path = '../input/spoken-language-identification/train/train/'
test_path = '../input/spoken-language-identification/test/test/'