From 08611de8e6fc70ac1e06fff0e04d908eada44bd3 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 7 Jun 2021 19:26:21 +0200 Subject: [PATCH] Fix Tensorflow seed assignment --- src/model.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/model.py b/src/model.py index c73104a..9530d8a 100644 --- a/src/model.py +++ b/src/model.py @@ -17,7 +17,6 @@ def build_model() -> Model: """ model = Sequential( [ - # Two convolutions + maxpooling blocks layers.Conv1D( filters=16, kernel_size=5, @@ -32,9 +31,7 @@ def build_model() -> Model: kernel_regularizer=l2(L2), ), layers.MaxPool1D(pool_size=3, strides=1), - # Flatten the input volume layers.Flatten(), - # Two fully connected layers, each followed by a dropout layer layers.Dense( units=16, activation="relu", @@ -47,7 +44,7 @@ def build_model() -> Model: kernel_regularizer=l2(L2), ), layers.Dropout(rate=0.3), - # Output layer with softmax activation + # FIXME Change output size layers.Dense(units=len(BASES), activation="softmax"), ] ) @@ -74,7 +71,7 @@ def run(data_file, label_file, seed_value=42) -> None: Create a dataset, a model and runs training and evaluation on it """ seed(seed_value) - set_seed(seed) + set_seed(seed_value) train_data, eval_data, test_data = dataset_creation(data_file, label_file) tensorboard = TensorBoard(log_dir=LOG_DIR, histogram_freq=1, profile_batch=0) model = build_model()