Fixes for lab5, lab6
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:50:19 +02:00
parent eab03a1f84
commit 9aa2b7d4ad
3 changed files with 25 additions and 33 deletions

2
Jenkinsfile vendored
View File

@ -18,7 +18,7 @@ stages {
// sh "chmod 777 ./data_download.sh"
// sh "./data_download.sh"
// Zapisanie artefaktów
archiveArtifacts "results.txt"
archiveArtifacts "results_lab5.txt"
archiveArtifacts "MoviesOnStreamingPlatforms_updated.dev"
archiveArtifacts "MoviesOnStreamingPlatforms_updated.test"
archiveArtifacts "MoviesOnStreamingPlatforms_updated.train"

View File

@ -23,9 +23,6 @@ test_Y = tf.convert_to_tensor(test_data[["IMDb"]])
normalizer = preprocessing.Normalization(input_shape=[3,])
normalizer.adapt(train_X)
if os.path.isdir('linear_regression'):
model = keras.models.load_model('linear_regression')
else:
model = keras.Sequential([
keras.Input(shape=(len(columns_to_use),)),
normalizer,
@ -40,8 +37,6 @@ else:
model.fit(train_X, train_Y, verbose=0, epochs=100)
model.save('linear_regression')
# Predykcja na danych testowych
results = model.predict(test_X)

View File

@ -27,9 +27,6 @@ train_Y = tf.convert_to_tensor(train_data[["IMDb"]])
normalizer = preprocessing.Normalization(input_shape=[3,])
normalizer.adapt(train_X)
if os.path.isdir('linear_regression'):
model = keras.models.load_model('linear_regression')
else:
model = keras.Sequential([
keras.Input(shape=(len(columns_to_use),)),
normalizer,