Skip to content

Commit

Permalink
Log validation accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
gmontamat committed Sep 21, 2024
1 parent 7bbcba3 commit 6fd917d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gentun/models/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,11 @@ def create_train_evaluate(
"""
self.reset_weights()
for epochs, learning_rate in zip(self.epochs, self.learning_rate):
logging.info("Training %d epochs with learning rate %.4f", epochs, learning_rate)
logging.debug("Training %d epochs with learning rate %4.1g", epochs, learning_rate)
self.model.compile(
optimizer=Adam(learning_rate=learning_rate), loss="binary_crossentropy", metrics=["accuracy"]
)
self.model.fit(x_train, y_train, epochs=epochs, batch_size=self.batch_size, verbose=1)
self.model.fit(
x_train, y_train, epochs=epochs, batch_size=self.batch_size, validation_data=(x_test, y_test), verbose=1
)
return self.model.evaluate(x_test, y_test, verbose=0)[1]

0 comments on commit 6fd917d

Please sign in to comment.