Update 'predict.py'
This commit is contained in:
parent
aabea45e4c
commit
a23a72f568
@ -6,6 +6,7 @@ from keras.applications.densenet import layers
|
|||||||
from sklearn.model_selection import train_test_split
|
from sklearn.model_selection import train_test_split
|
||||||
import tensorflow
|
import tensorflow
|
||||||
|
|
||||||
|
build_number = int(os.environ['BUILD_NUMBER'])
|
||||||
|
|
||||||
reloaded = tensorflow.keras.models.load_model('test')
|
reloaded = tensorflow.keras.models.load_model('test')
|
||||||
|
|
||||||
@ -14,8 +15,9 @@ y_to_test = pandas.read_csv('./Y_test.csv')
|
|||||||
|
|
||||||
accu = reloaded.evaluate(x_to_test, y_to_test)
|
accu = reloaded.evaluate(x_to_test, y_to_test)
|
||||||
|
|
||||||
|
|
||||||
with open('metrics.csv', 'a') as file:
|
with open('metrics.csv', 'a') as file:
|
||||||
file.write(f'{accu},')
|
file.write(f'{build_number},{accu}\n')
|
||||||
|
|
||||||
pre = reloaded.predict(x_to_test)
|
pre = reloaded.predict(x_to_test)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user