Skip to content

Conversation

@ranjodhsingh1729
Copy link

Description

A small addition to the PrintLoss callback which allows to print loss value every printInterval epochs. The change is backwards compatible (printInterval has a default value of 1).

Copy link
Member

@rcurtin rcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks correct enough to me but I have to ask, is there really any need for this? PrintLoss is meant to be a really primitive callback. I haven't ever seen anyone ask for this particular feature and I'm not actually sure the situation where someone would want to use it.

const double objective)
{
output << objective << std::endl;
// epochs are 1-indexed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are they? I thought they started at 0. In either case, it doesn't really make a big difference: if they are 0-indexed they will print the first iteration too.

@ranjodhsingh1729
Copy link
Author

I figured it might help, since with lots of iterations the terminal can get flooded and we lose all previous output. If we don't print anything, though, there's no sense of progress. I also wanted to include the epoch number in the output, but didn't want to change the current behavior.

Happy to leave it as is if you think keeping PrintLoss simple makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants