Switched preprocessing to not use boolean values but actual step counts
This commit is contained in:
+2
-2
@@ -209,7 +209,7 @@ def train_models_v2(user_data, user_data_val, sequence_length, model_type):
|
||||
return tuner.get_best_models(num_models=1)[0]
|
||||
|
||||
|
||||
def train_one_model(train_data, val_data, n_batch, n_epochs, n_neurons, l_rate, reg, sequence_length, model_type):
|
||||
def train_one_model(train_data, val_data, n_batch, n_epochs, n_neurons, l_rate, sequence_length, model_type):
|
||||
x, y = prepare_data_for_model(user_data=train_data, sequence_length=sequence_length)
|
||||
n_features = x.shape[2]
|
||||
users = list(train_data.keys())
|
||||
@@ -217,7 +217,7 @@ def train_one_model(train_data, val_data, n_batch, n_epochs, n_neurons, l_rate,
|
||||
# prepare model
|
||||
def build_model():
|
||||
model = Sequential()
|
||||
model.add(Input(shape=(sequence_length, n_features), batch_size=n_batch, bias_regularizer=reg))
|
||||
model.add(Input(shape=(sequence_length, n_features), batch_size=n_batch))
|
||||
# if model_type == model_type_bilstm:
|
||||
# model.add(Bidirectional(units=units_hp))
|
||||
if model_type == model_type_lstm:
|
||||
|
||||
Reference in New Issue
Block a user