Skip to content

Commit

Permalink
Added new trace code for batch time record
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderSherlock committed Oct 11, 2021
1 parent d1f3d38 commit df20004
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dlib/dnn/syncer/syncer_worker.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ namespace dlib
// TODO: check if trainer is busy, if then wait until it become idle.

// Request a task fit its computability
this->logger->log(this->me.number, this->me.number, 0, "AB - a start of AB");
network::msgheader req_header, res_header;
task_op req_task, res_task;
dataset<data_type, label_type> local_training;
Expand Down Expand Up @@ -269,6 +270,7 @@ namespace dlib
std::cout << "Learning rate is " << this->trainer->learning_rate << std::endl;

std::cout << "Time for batch is " << std::chrono::duration_cast<std::chrono::milliseconds>(system_clock::now() - batch_time).count() << std::endl; // *_*
this->logger->log(this->me.number, this->me.number, 1, "AB - a start of AB");
return 1;
}

Expand Down

0 comments on commit df20004

Please sign in to comment.