Skip to content

Commit

Permalink
Fixed comment in scheduler.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
ugermann committed Aug 23, 2020
1 parent bdda7bd commit 3c1656d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/training/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ class Scheduler : public TrainingObserver {

void validate(const std::vector<Ptr<ExpressionGraph>>& graphs,
bool isFinal = false) {
// Do not validate if already validated (for instance, after the model is
// loaded) or if validation is scheduled for another update, or when a
// graceful shutdown was requested via --sig{term|usr1|usr2}.
if(gracefulExitRequested() // signal requesting graceful exit (save model and exit) was received
// Do not validate if already validated (for instance, after the model is loaded)
// or if validation is scheduled for another update, or when a graceful shutdown
// was requested.
if(gracefulExitRequested()
|| state_->validated // already validated (in resumed training, for example)
|| (!state_->enteredNewPeriodOf(options_->get<std::string>("valid-freq")) && !isFinal)) // not now
return;
Expand Down

0 comments on commit 3c1656d

Please sign in to comment.