diff --git a/.woodpecker.yml b/.woodpecker.yml index 8d770db..126e682 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,6 +2,9 @@ matrix: EPOCHS: - 20 - 30 + OPTIMIZER: + - adam + - SGD steps: "train": diff --git a/run.py b/run.py index d4fa441..d8d5090 100644 --- a/run.py +++ b/run.py @@ -9,7 +9,7 @@ from keras import backend as K K.clear_session() EPOCHS = int(os.getenv("EPOCHS", default = 10)) - +OPTIMIZER = os.getenv("OPTIMIZER", default = "SGD") gpus = tf.config.experimental.list_physical_devices('GPU') @@ -72,7 +72,7 @@ with tf.device('/GPU:0'): keras.layers.Dense(10, activation='sigmoid') ]) # g - model.compile(optimizer='SGD', + model.compile(optimizer=OPTIMIZER, loss='categorical_crossentropy', metrics=['accuracy']) model.fit(X_train_scaled, y_train_categorical, epochs=EPOCHS)