Change training model params
Some checks failed
s434704-training/pipeline/head There was a failure building this commit

This commit is contained in:
Wojciech Jarmosz 2021-05-15 03:13:44 +02:00
parent bf458664b0
commit d392692d85
2 changed files with 2 additions and 4 deletions

View File

@ -4,8 +4,8 @@ pipeline {
} }
parameters { parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH' gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
string(name: 'epochs', description: 'Model epochs') string(name: 'epochs', description: 'epochs number', defaultValue: '100')
string(name: 'verbose', description: 'Model verbose') string(name: 'verbose', description: 'verbose number' defaultValue: '0')
buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR') buildSelector(defaultSelector: lastSuccessful(), description: 'Use latest build', name: 'BUILD_SELECTOR')
} }
stages { stages {

View File

@ -43,8 +43,6 @@ else:
optimizer=tf.keras.optimizers.Adam(0.001), optimizer=tf.keras.optimizers.Adam(0.001),
metrics=[tf.keras.metrics.RootMeanSquaredError()]) 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.fit(train_X, train_Y, verbose=verbose, epochs=epochs)
model.save('linear_regression.h5') model.save('linear_regression.h5')