Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit cc25435

Browse files
authored
Include style and content loss in metrics when available (#3131)
1 parent 5b9e95b commit cc25435

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/toolkits/style_transfer/style_transfer.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,16 @@ void style_transfer::iterate_training() {
825825

826826
add_or_update_state({
827827
{"training_iterations", progress->iteration_id},
828-
{"training_loss", progress->smoothed_loss},
828+
{"training_loss", progress->smoothed_loss}
829829
});
830830

831+
if (model_trainer_->SupportsLossComponents()) {
832+
add_or_update_state({
833+
{"training_style_loss", progress->style_loss},
834+
{"training_content_loss", progress->content_loss}
835+
});
836+
}
837+
831838
if (training_table_printer_) {
832839
if (model_trainer_->SupportsLossComponents()) {
833840
training_table_printer_->print_progress_row(

0 commit comments

Comments
 (0)