Compare commits
2 Commits
c6014e38bc
...
58422eee10
Author | SHA1 | Date | |
---|---|---|---|
![]() |
58422eee10 | ||
![]() |
3ae029a0e6 |
4
train.py
4
train.py
@ -57,7 +57,7 @@ def train_model(data_file, model_file, epochs, batch_size, test_size, random_sta
|
||||
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
|
||||
|
||||
model.fit(X_train, y_train, epochs=epochs, batch_size=batch_size)
|
||||
loss, accuracy = model.evaluate(X_test, y_test)
|
||||
accuracy = model.evaluate(X_test, y_test)
|
||||
print('Test accuracy:', accuracy)
|
||||
|
||||
model.save(model_file)
|
||||
@ -69,3 +69,5 @@ def run_experiment():
|
||||
accuracy = train_model()
|
||||
ex.log_scalar('accuracy', accuracy)
|
||||
ex.add_artifact('model.h5')
|
||||
|
||||
ex.run()
|
Loading…
Reference in New Issue
Block a user