From d392692d8594afd704eaa7778ac3b59a499d1506 Mon Sep 17 00:00:00 2001 From: Wojciech Jarmosz Date: Sat, 15 May 2021 03:13:44 +0200 Subject: [PATCH] Change training model params --- Jenkinsfile_train | 4 ++-- training.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile_train b/Jenkinsfile_train index 51c7a2e..b429afd 100644 --- a/Jenkinsfile_train +++ b/Jenkinsfile_train @@ -4,8 +4,8 @@ pipeline { } parameters { gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' - string(name: 'epochs', description: 'Model epochs') - string(name: 'verbose', description: 'Model verbose') + string(name: 'epochs', description: 'epochs number', defaultValue: '100') + string(name: 'verbose', description: 'verbose number' defaultValue: '0') buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR') } stages { diff --git a/training.py b/training.py index 58f7655..f3b3e23 100644 --- a/training.py +++ b/training.py @@ -43,8 +43,6 @@ else: optimizer=tf.keras.optimizers.Adam(0.001), metrics=[tf.keras.metrics.RootMeanSquaredError()]) - verbose = 0 if len(verbose) == 0 else int(verbose[0]) - epochs = 100 if len(epochs) == 0 else int(epochs[0]) model.fit(train_X, train_Y, verbose=verbose, epochs=epochs) model.save('linear_regression.h5') \ No newline at end of file