|
|
@ -11,7 +11,7 @@ from tensorflow.keras.callbacks import ReduceLROnPlateau, EarlyStopping |
|
|
|
from keras_tuner import RandomSearch |
|
|
|
from sklearn.metrics import accuracy_score |
|
|
|
|
|
|
|
epochs = 2#50 # TODO: change |
|
|
|
epochs = 50 |
|
|
|
model_type_gru = 'GRU' |
|
|
|
model_type_lstm = 'LSTM' |
|
|
|
model_type_bilstm = 'BiLSTM' |
|
|
@ -114,7 +114,7 @@ def train_models(user_data, user_data_val, sequence_lengths, tuner_dir="./workin |
|
|
|
tuner = RandomSearch( |
|
|
|
build_model, |
|
|
|
objective='val_loss', |
|
|
|
max_trials=2, #30, TODO: change |
|
|
|
max_trials=30, |
|
|
|
executions_per_trial=2, |
|
|
|
directory=tuner_dir, |
|
|
|
project_name=f'lstm_seq_{sequence_length}' |
|
|
|